[*] Binary protection state of ble_advertise
Full RELRO Canary found NX disabled No PIE No RPATH No RUNPATH No Symbols
[*] Function printf tear down of ble_advertise
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/ble_advertise @ 0x4040c4 */
| #include <stdint.h>
|
; (fcn) main () | int32_t main () {
0x004040c4 lui gp, 2 |
0x004040c8 addiu gp, gp, -0x60a4 |
0x004040cc addu gp, gp, t9 | gp += t9;
0x004040d0 addiu sp, sp, -0x90 |
0x004040d4 sw ra, 0x8c(sp) | *(var_8ch) = ra;
0x004040d8 sw fp, 0x88(sp) | *(var_88h) = fp;
0x004040dc move fp, sp | fp = sp;
0x004040e0 sw gp, 0x10(sp) | *(var_10h) = gp;
0x004040e4 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x004040e8 sw a1, 0x18(fp) | *(arg_18h) = a1;
0x004040ec lw t8, -0x7ec8(gp) | t8 = *((gp - 8114));
0x004040f0 lw t8, (t8) | t8 = *(t8);
0x004040f4 sw t8, 0x84(fp) | *(arg_84h) = t8;
0x004040f8 sw zero, 0x20(fp) | *(arg_20h) = 0;
0x004040fc lw t8, 0x1c(fp) | t8 = *(arg_1ch);
| if (t8 <= 0) {
0x00404100 bgtz t8, 0x40413c |
0x00404104 nop |
0x00404108 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x0040410c lw t8, (t8) | t8 = *(t8);
0x00404110 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.Usage:__s__hciX__n */
0x00404114 addiu a0, v0, 0x5014 | a0 = v0 + 0x5014;
0x00404118 move a1, t8 | a1 = t8;
0x0040411c lw t8, -0x7f70(gp) | t8 = sym.imp.printf
0x00404120 move t9, t8 | t9 = t8;
0x00404124 jalr t9 | t9 ();
0x00404128 nop |
0x0040412c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404130 move t8, zero | t8 = 0;
0x00404134 b 0x404494 | goto label_0;
0x00404138 nop |
| }
0x0040413c addiu a0, zero, 0x1f | a0 = 0x1f;
0x00404140 addiu a1, zero, 3 | a1 = 3;
0x00404144 addiu a2, zero, 1 | a2 = 1;
0x00404148 lw t8, -0x7f4c(gp) | t8 = sym.imp.socket;
0x0040414c move t9, t8 | t9 = t8;
0x00404150 jalr t9 | t9 ();
0x00404154 nop |
0x00404158 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040415c sw v0, 0x24(fp) | *(arg_24h) = v0;
0x00404160 lw t8, 0x24(fp) | t8 = *(arg_24h);
0x00404164 srl t8, t8, 0x1f | t8 >>= 0x1f;
0x00404168 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x0040416c beqz t8, 0x4041a4 |
0x00404170 nop |
0x00404174 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Cant_open_HCI_socket. */
0x00404178 addiu a0, t8, 0x5028 | a0 = t8 + 0x5028;
0x0040417c lw t8, -0x7f38(gp) | t8 = sym.imp.perror;
0x00404180 move t9, t8 | t9 = t8;
0x00404184 jalr t9 | t9 ();
0x00404188 nop |
0x0040418c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404190 addiu a0, zero, 1 | a0 = 1;
0x00404194 lw t8, -0x7f54(gp) | t8 = sym.imp.exit;
0x00404198 move t9, t8 | t9 = t8;
0x0040419c jalr t9 | t9 ();
0x004041a0 nop |
| }
0x004041a4 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x004041a8 move a0, t8 | a0 = t8;
0x004041ac move a1, zero | a1 = 0;
0x004041b0 addiu a2, zero, 0x5c | a2 = 0x5c;
0x004041b4 lw t8, -0x7f34(gp) | t8 = sym.imp.memset;
0x004041b8 move t9, t8 | t9 = t8;
0x004041bc jalr t9 | t9 ();
0x004041c0 nop |
0x004041c4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004041c8 lw t8, 0x18(fp) | t8 = *(arg_18h);
0x004041cc lw t8, (t8) | t8 = *(t8);
0x004041d0 addiu t8, t8, 3 | t8 += 3;
0x004041d4 move a0, t8 | a0 = t8;
0x004041d8 lw t8, -0x7f64(gp) | t8 = sym.imp.atoi;
0x004041dc move t9, t8 | t9 = t8;
0x004041e0 jalr t9 | t9 ();
0x004041e4 nop |
0x004041e8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004041ec move t8, v0 | t8 = v0;
0x004041f0 andi t8, t8, 0xffff | t8 &= 0xffff;
0x004041f4 sh t8, 0x28(fp) | *(arg_28h) = t8;
0x004041f8 lui v0, 4 | v0 = 0x40000;
0x004041fc lui t8, 0x4000 | t8 = 0x400048d3;
0x00404200 ori t8, t8, 0x48d3 |
0x00404204 or v0, v0, t8 | v0 |= t8;
0x00404208 addiu t8, fp, 0x28 | t8 = fp + 0x28;
0x0040420c lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00404210 move a1, v0 | a1 = v0;
0x00404214 move a2, t8 | a2 = t8;
0x00404218 lw t8, -0x7ee4(gp) | t8 = sym.imp.ioctl;
0x0040421c move t9, t8 | t9 = t8;
0x00404220 jalr t9 | t9 ();
0x00404224 nop |
0x00404228 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040422c move t8, v0 | t8 = v0;
0x00404230 sltu t8, zero, t8 | t8 = (0 < t8) ? 1 : 0;
0x00404234 andi t8, t8, 0xff | t8 &= 0xff;
| if (t8 != 0) {
0x00404238 beqz t8, 0x404270 |
0x0040423c nop |
0x00404240 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Cant_get_device_info */
0x00404244 addiu a0, t8, 0x5040 | a0 = t8 + 0x5040;
0x00404248 lw t8, -0x7f38(gp) | t8 = sym.imp.perror;
0x0040424c move t9, t8 | t9 = t8;
0x00404250 jalr t9 | t9 ();
0x00404254 nop |
0x00404258 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040425c addiu a0, zero, 1 | a0 = 1;
0x00404260 lw t8, -0x7f54(gp) | t8 = sym.imp.exit;
0x00404264 move t9, t8 | t9 = t8;
0x00404268 jalr t9 | t9 ();
0x0040426c nop |
| }
0x00404270 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before__hciconfig_hci0_up_. */
0x00404274 addiu a0, t8, 0x5058 | a0 = t8 + 0x5058;
0x00404278 lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x0040427c move t9, t8 | t9 = t8;
0x00404280 jalr t9 | t9 ();
0x00404284 nop |
0x00404288 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040428c lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x00404290 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00404294 move a1, t8 | a1 = t8;
0x00404298 lw t8, -0x7fb4(gp) | t8 = sym.cmd_up_int__int_;
0x0040429c move t9, t8 | t9 = t8;
0x004042a0 jalr t9 | t9 ();
0x004042a4 nop |
0x004042a8 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004042ac move t8, v0 | t8 = v0;
0x004042b0 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x004042b4 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 < 0) {
0x004042b8 bgez t8, 0x4042c8 |
0x004042bc nop |
0x004042c0 b 0x404478 | goto label_1;
0x004042c4 nop |
| }
0x004042c8 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before__hciconfig_hci0_noleadv_. */
0x004042cc addiu a0, t8, 0x5074 | a0 = t8 + 0x5074;
0x004042d0 lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x004042d4 move t9, t8 | t9 = t8;
0x004042d8 jalr t9 | t9 ();
0x004042dc nop |
0x004042e0 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004042e4 lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x004042e8 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x004042ec move a1, t8 | a1 = t8;
0x004042f0 lw t8, -0x7fb0(gp) | t8 = sym.cmd_no_le_adv_int__int_;
0x004042f4 move t9, t8 | t9 = t8;
0x004042f8 jalr t9 | t9 ();
0x004042fc nop |
0x00404300 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404304 move t8, v0 | t8 = v0;
0x00404308 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x0040430c lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 < 0) {
0x00404310 bgez t8, 0x404320 |
0x00404314 nop |
0x00404318 b 0x404478 | goto label_1;
0x0040431c nop |
| }
0x00404320 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before__hciconfig_hci0_noscan_. */
0x00404324 addiu a0, t8, 0x5098 | a0 = t8 + 0x5098;
0x00404328 lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x0040432c move t9, t8 | t9 = t8;
0x00404330 jalr t9 | t9 ();
0x00404334 nop |
0x00404338 lw gp, 0x10(fp) | gp = *(arg_10h);
0x0040433c lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x00404340 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00404344 move a1, t8 | a1 = t8;
0x00404348 move a2, zero | a2 = 0;
0x0040434c lw t8, -0x7fac(gp) | t8 = sym.cmd_scan_int__int__char_;
0x00404350 move t9, t8 | t9 = t8;
0x00404354 jalr t9 | t9 ();
0x00404358 nop |
0x0040435c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404360 move t8, v0 | t8 = v0;
0x00404364 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x00404368 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 < 0) {
0x0040436c bgez t8, 0x40437c |
0x00404370 nop |
0x00404374 b 0x404478 | goto label_1;
0x00404378 nop |
| }
0x0040437c lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before_send_scan_response. */
0x00404380 addiu a0, t8, 0x50b8 | a0 = t8 + 0x50b8;
0x00404384 lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x00404388 move t9, t8 | t9 = t8;
0x0040438c jalr t9 | t9 ();
0x00404390 nop |
0x00404394 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404398 lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x0040439c lw a0, 0x24(fp) | a0 = *(arg_24h);
0x004043a0 move a1, t8 | a1 = t8;
0x004043a4 lw t8, -0x7fa8(gp) | t8 = sym.cmd_send_scan_response_int__int_;
0x004043a8 move t9, t8 | t9 = t8;
0x004043ac jalr t9 | t9 ();
0x004043b0 nop |
0x004043b4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004043b8 move t8, v0 | t8 = v0;
0x004043bc sw t8, 0x20(fp) | *(arg_20h) = t8;
0x004043c0 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 < 0) {
0x004043c4 bgez t8, 0x4043d4 |
0x004043c8 nop |
0x004043cc b 0x404478 | goto label_1;
0x004043d0 nop |
| }
0x004043d4 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before_send_advertising_data. */
0x004043d8 addiu a0, t8, 0x50d4 | a0 = t8 + 0x50d4;
0x004043dc lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x004043e0 move t9, t8 | t9 = t8;
0x004043e4 jalr t9 | t9 ();
0x004043e8 nop |
0x004043ec lw gp, 0x10(fp) | gp = *(arg_10h);
0x004043f0 lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x004043f4 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x004043f8 move a1, t8 | a1 = t8;
0x004043fc lw t8, -0x7fa4(gp) | t8 = sym.cmd_send_advertising_data_int__int_;
0x00404400 move t9, t8 | t9 = t8;
0x00404404 jalr t9 | t9 ();
0x00404408 nop |
0x0040440c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404410 move t8, v0 | t8 = v0;
0x00404414 sw t8, 0x20(fp) | *(arg_20h) = t8;
0x00404418 lw t8, 0x20(fp) | t8 = *(arg_20h);
| if (t8 < 0) {
0x0040441c bgez t8, 0x40442c |
0x00404420 nop |
0x00404424 b 0x404478 | goto label_1;
0x00404428 nop |
| }
0x0040442c lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Before_set_advertisement_interval. */
0x00404430 addiu a0, t8, 0x50f4 | a0 = t8 + 0x50f4;
0x00404434 lw t8, -0x7f7c(gp) | t8 = sym.imp.puts;
0x00404438 move t9, t8 | t9 = t8;
0x0040443c jalr t9 | t9 ();
0x00404440 nop |
0x00404444 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404448 lhu t8, 0x28(fp) | t8 = *(arg_28h);
0x0040444c lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00404450 move a1, t8 | a1 = t8;
0x00404454 lw t8, -0x7fdc(gp) | t8 = *(gp);
0x00404458 addiu a2, t8, 0x5118 | a2 = t8 + 0x5118;
0x0040445c lw t8, -0x7fa0(gp) | t8 = sym.cmd_le_adv_int__int__char_;
0x00404460 move t9, t8 | t9 = t8;
0x00404464 jalr t9 | t9 ();
0x00404468 nop |
0x0040446c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404470 move t8, v0 | t8 = v0;
0x00404474 sw t8, 0x20(fp) | *(arg_20h) = t8;
| label_1:
0x00404478 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0040447c lw t8, -0x7f24(gp) | t8 = sym.imp.close;
0x00404480 move t9, t8 | t9 = t8;
0x00404484 jalr t9 | t9 ();
0x00404488 nop |
0x0040448c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00404490 move t8, zero | t8 = 0;
| label_0:
0x00404494 move v0, t8 | v0 = t8;
0x00404498 lw t8, -0x7ec8(gp) | t8 = *((gp - 8114));
0x0040449c lw v1, 0x84(fp) | v1 = *(arg_84h);
0x004044a0 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x004044a4 beq v1, t8, 0x4044bc |
0x004044a8 nop |
0x004044ac lw t8, -0x7f0c(gp) | t8 = sym.imp.__stack_chk_fail;
0x004044b0 move t9, t8 | t9 = t8;
0x004044b4 jalr t9 | t9 ();
0x004044b8 nop |
| }
0x004044bc move sp, fp |
0x004044c0 lw ra, 0x8c(sp) | ra = *(var_8ch);
0x004044c4 lw fp, 0x88(sp) | fp = *(var_88h);
0x004044c8 addiu sp, sp, 0x90 |
0x004044cc jr ra | return v1;
0x004044d0 nop |
| }
; assembly | /* r2dec pseudo code output */
| /* /logs/firmware/patool_extraction/DUMP/mtdblock8_unblob_extracted/mtdblock8_extract/0-9650176.squashfs_v4_le_extract/sbin/ble_advertise @ 0x401834 */
| #include <stdint.h>
|
; (fcn) sym.cmd_no_le_adv_int__int_ () | void cmd_no_le_adv_int_int_ () {
| /* cmd_no_le_adv(int, int) */
0x00401834 lui gp, 2 |
0x00401838 addiu gp, gp, -0x3814 |
0x0040183c addu gp, gp, t9 | gp += t9;
0x00401840 addiu sp, sp, -0x58 |
0x00401844 sw ra, 0x54(sp) | *(var_54h) = ra;
0x00401848 sw fp, 0x50(sp) | *(var_50h) = fp;
0x0040184c sw s0, 0x4c(sp) | *(var_4ch) = s0;
0x00401850 move fp, sp | fp = sp;
0x00401854 sw gp, 0x10(sp) | *(var_10h) = gp;
0x00401858 sw a0, 0x1c(fp) | *(arg_1ch) = a0;
0x0040185c sw a1, 0x18(fp) | *(arg_18h) = a1;
0x00401860 lw t8, -0x7ec8(gp) | t8 = *((gp - 8114));
0x00401864 lw t8, (t8) | t8 = *(t8);
0x00401868 sw t8, 0x44(fp) | *(arg_44h) = t8;
0x0040186c lw t8, 0x18(fp) | t8 = *(arg_18h);
| if (t8 < 0) {
0x00401870 bgez t8, 0x401898 |
0x00401874 nop |
0x00401878 move a0, zero | a0 = 0;
0x0040187c lw t8, -0x7ef8(gp) | t8 = sym.imp.hci_get_route;
0x00401880 move t9, t8 | t9 = t8;
0x00401884 jalr t9 | t9 ();
0x00401888 nop |
0x0040188c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401890 move t8, v0 | t8 = v0;
0x00401894 sw t8, 0x18(fp) | *(arg_18h) = t8;
| }
0x00401898 lw a0, 0x18(fp) | a0 = *(arg_18h);
0x0040189c lw t8, -0x7f80(gp) | t8 = sym.imp.hci_open_dev;
0x004018a0 move t9, t8 | t9 = t8;
0x004018a4 jalr t9 | t9 ();
0x004018a8 nop |
0x004018ac lw gp, 0x10(fp) | gp = *(arg_10h);
0x004018b0 move t8, v0 | t8 = v0;
0x004018b4 sw t8, 0x24(fp) | *(arg_24h) = t8;
0x004018b8 lw t8, 0x24(fp) | t8 = *(arg_24h);
| if (t8 < 0) {
0x004018bc bgez t8, 0x4018ec |
0x004018c0 nop |
0x004018c4 lw t8, -0x7fdc(gp) | t8 = *(gp);
| /* str.Could_not_open_device */
0x004018c8 addiu a0, t8, 0x4d94 | a0 = t8 + 0x4d94;
0x004018cc lw t8, -0x7f38(gp) | t8 = sym.imp.perror;
0x004018d0 move t9, t8 | t9 = t8;
0x004018d4 jalr t9 | t9 ();
0x004018d8 nop |
0x004018dc lw gp, 0x10(fp) | gp = *(arg_10h);
0x004018e0 addiu t8, zero, -1 | t8 = -1;
0x004018e4 b 0x401a74 | goto label_0;
0x004018e8 nop |
| }
0x004018ec addiu t8, fp, 0x20 | t8 = fp + 0x20;
0x004018f0 move a0, t8 | a0 = t8;
0x004018f4 move a1, zero | a1 = 0;
0x004018f8 addiu a2, zero, 1 | a2 = 1;
0x004018fc lw t8, -0x7f34(gp) | t8 = sym.imp.memset;
0x00401900 move t9, t8 | t9 = t8;
0x00401904 jalr t9 | t9 ();
0x00401908 nop |
0x0040190c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401910 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x00401914 move a0, t8 | a0 = t8;
0x00401918 move a1, zero | a1 = 0;
0x0040191c addiu a2, zero, 0x18 | a2 = 0x18;
0x00401920 lw t8, -0x7f34(gp) | t8 = sym.imp.memset;
0x00401924 move t9, t8 | t9 = t8;
0x00401928 jalr t9 | t9 ();
0x0040192c nop |
0x00401930 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401934 addiu t8, zero, 8 | t8 = 8;
0x00401938 sh t8, 0x2c(fp) | *(arg_2ch) = t8;
0x0040193c addiu t8, zero, 0xa | t8 = 0xa;
0x00401940 sh t8, 0x2e(fp) | *(arg_2eh) = t8;
0x00401944 addiu t8, fp, 0x20 | t8 = fp + 0x20;
0x00401948 sw t8, 0x34(fp) | *(arg_34h) = t8;
0x0040194c addiu t8, zero, 1 | t8 = 1;
0x00401950 sw t8, 0x38(fp) | *(arg_38h) = t8;
0x00401954 addiu t8, fp, 0x23 | t8 = fp + 0x23;
0x00401958 sw t8, 0x3c(fp) | *(arg_3ch) = t8;
0x0040195c addiu t8, zero, 1 | t8 = 1;
0x00401960 sw t8, 0x40(fp) | *(arg_40h) = t8;
0x00401964 addiu t8, fp, 0x2c | t8 = fp + 0x2c;
0x00401968 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x0040196c move a1, t8 | a1 = t8;
0x00401970 addiu a2, zero, 0x3e8 | a2 = 0x3e8;
0x00401974 lw t8, -0x7f84(gp) | t8 = sym.imp.hci_send_req;
0x00401978 move t9, t8 | t9 = t8;
0x0040197c jalr t9 | t9 ();
0x00401980 nop |
0x00401984 lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401988 move t8, v0 | t8 = v0;
0x0040198c sw t8, 0x28(fp) | *(arg_28h) = t8;
0x00401990 lw a0, 0x24(fp) | a0 = *(arg_24h);
0x00401994 lw t8, -0x7ec0(gp) | t8 = sym.imp.hci_close_dev;
0x00401998 move t9, t8 | t9 = t8;
0x0040199c jalr t9 | t9 ();
0x004019a0 nop |
0x004019a4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004019a8 lw t8, 0x28(fp) | t8 = *(arg_28h);
| if (t8 < 0) {
0x004019ac bgez t8, 0x401a3c |
0x004019b0 nop |
0x004019b4 lw t8, -0x7ec4(gp) | t8 = sym.imp.__errno_location;
0x004019b8 move t9, t8 | t9 = t8;
0x004019bc jalr t9 | t9 ();
0x004019c0 nop |
0x004019c4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004019c8 move t8, v0 | t8 = v0;
0x004019cc lw t8, (t8) | t8 = *(t8);
0x004019d0 move a0, t8 | a0 = t8;
0x004019d4 lw t8, -0x7f6c(gp) | t8 = sym.imp.strerror;
0x004019d8 move t9, t8 | t9 = t8;
0x004019dc jalr t9 | t9 ();
0x004019e0 nop |
0x004019e4 lw gp, 0x10(fp) | gp = *(arg_10h);
0x004019e8 move s0, v0 | s0 = v0;
0x004019ec lw t8, -0x7ec4(gp) | t8 = sym.imp.__errno_location;
0x004019f0 move t9, t8 | t9 = t8;
0x004019f4 jalr t9 | t9 ();
0x004019f8 nop |
0x004019fc lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401a00 move t8, v0 | t8 = v0;
0x00401a04 lw t8, (t8) | t8 = *(t8);
0x00401a08 lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.Cant_set_advertise_mode_on_hci_d:__s___d__n */
0x00401a0c addiu a0, v0, 0x4dac | a0 = v0 + 0x4dac;
0x00401a10 lw a1, 0x18(fp) | a1 = *(arg_18h);
0x00401a14 move a2, s0 | a2 = s0;
0x00401a18 move a3, t8 | a3 = t8;
0x00401a1c lw t8, -0x7f70(gp) | t8 = sym.imp.printf
0x00401a20 move t9, t8 | t9 = t8;
0x00401a24 jalr t9 | t9 ();
0x00401a28 nop |
0x00401a2c lw gp, 0x10(fp) | gp = *(arg_10h);
0x00401a30 addiu t8, zero, -1 | t8 = -1;
0x00401a34 b 0x401a74 | goto label_0;
0x00401a38 nop |
| }
0x00401a3c lbu t8, 0x23(fp) | t8 = *(arg_23h);
| if (t8 != 0) {
0x00401a40 beqz t8, 0x401a70 |
0x00401a44 nop |
0x00401a48 lbu t8, 0x23(fp) | t8 = *(arg_23h);
0x00401a4c lw v0, -0x7fdc(gp) | v0 = *(gp);
| /* str.LE_set_advertise_enable_on_hci_d_returned_status__d_n */
0x00401a50 addiu a0, v0, 0x4dd8 | a0 = v0 + 0x4dd8;
0x00401a54 lw a1, 0x18(fp) | a1 = *(arg_18h);
0x00401a58 move a2, t8 | a2 = t8;
0x00401a5c lw t8, -0x7f70(gp) | t8 = sym.imp.printf
0x00401a60 move t9, t8 | t9 = t8;
0x00401a64 jalr t9 | t9 ();
0x00401a68 nop |
0x00401a6c lw gp, 0x10(fp) | gp = *(arg_10h);
| }
0x00401a70 move t8, zero | t8 = 0;
| label_0:
0x00401a74 move v0, t8 | v0 = t8;
0x00401a78 lw t8, -0x7ec8(gp) | t8 = *((gp - 8114));
0x00401a7c lw v1, 0x44(fp) | v1 = *(arg_44h);
0x00401a80 lw t8, (t8) | t8 = *(t8);
| if (v1 != t8) {
0x00401a84 beq v1, t8, 0x401a9c |
0x00401a88 nop |
0x00401a8c lw t8, -0x7f0c(gp) | t8 = sym.imp.__stack_chk_fail;
0x00401a90 move t9, t8 | t9 = t8;
0x00401a94 jalr t9 | t9 ();
0x00401a98 nop |
| }
0x00401a9c move sp, fp |
0x00401aa0 lw ra, 0x54(sp) | ra = *(var_54h);
0x00401aa4 lw fp, 0x50(sp) | fp = *(var_50h);
0x00401aa8 lw s0, 0x4c(sp) | s0 = *(var_4ch);
0x00401aac addiu sp, sp, 0x58 |
0x00401ab0 jr ra | return v1;
0x00401ab4 nop |
| }
[*] Function printf used 4 times ble_advertise