Function at 0x4082c0
Capabilities:
Create directory
Query environment variable
Write file on windows

Disassembly:
push ebp
mov eax, 0x217c
mov ebp, esp
push edi
push esi
push ebx
call fcn.0041f230
sub esp, 0xc
push str.ANDROID_PRODUCT_OUT
call sym._getenv
add esp, 0x10
mov dword [0x431080], eax
test eax, eax
je 0x4083c8
cmp byte [eax], 0
je 0x4083c8
sub esp, 0xc
push str.ANDROID_SERIAL
call sym._getenv
mov dword [ebp - 0x2164], eax
mov dword [esp], str.ANDROID_ADB_SERVER_PORT
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x408327
cmp byte [eax], 0
jne 0x4088b3
mov dword [ebp - 0x2160], 0x1433
mov eax, dword [ebp + 8]
test eax, eax
jle 0x40849d
mov dword [ebp - 0x2178], 0
mov dword [ebp - 0x2174], 0
mov dword [ebp - 0x2170], 0
mov dword [ebp - 0x216c], 0
mov dword [ebp - 0x2168], 2
jmp 0x408395
mov dword [ebp - 0x2170], 1
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
add eax, 4
mov edi, dword [ebp + 8]
mov dword [ebp + 0xc], eax
test edi, edi
jle 0x408418
mov eax, dword [ebp + 0xc]
mov ecx, 7
cld
mov ebx, dword [eax]
mov edi, str.server
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
je 0x408370
cld
mov edi, str.nodaemon
mov ecx, 9
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4083d7
mov dword [ebp - 0x2178], 1
jmp 0x40837a
mov dword [0x431080], 0
jmp 0x4082f6
cld
mov edi, str.fork_server
mov ecx, 0xc
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4083f4
mov dword [ebp - 0x2174], 1
jmp 0x40837a
cld
mov edi, str.persist
mov ecx, 8
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40875a
mov dword [ebp - 0x216c], 1
jmp 0x40837a
push esi
push esi
mov ebx, dword [ebp - 0x2164]
push ebx
mov ecx, dword [ebp - 0x2168]
push ecx
call dbg.adb_set_transport
pop edx
mov eax, dword [ebp - 0x2160]
push eax
call dbg.adb_set_tcp_specifics
mov eax, dword [ebp - 0x2170]
add esp, 0x10
test eax, eax
je 0x4084d1
mov edx, dword [ebp - 0x2174]
or edx, dword [ebp - 0x2178]
je 0x4088e0
push eax
push eax
mov eax, dword [ebp - 0x2160]
push eax
mov eax, dword [ebp - 0x2174]
push eax
call dbg.adb_main
add esp, 0x10
mov ebx, eax
test ebx, ebx
je 0x408493
mov eax, dword [sym.imp.msvcrt.dll__iob]
push esi
add eax, 0x40
push esi
push str._could_not_start_server__n
push eax
call sym._fprintf_5
add esp, 0x10
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
push eax
push eax
mov eax, dword [ebp - 0x2164]
push eax
push 2
call dbg.adb_set_transport
pop edi
mov esi, dword [ebp - 0x2160]
push esi
call dbg.adb_set_tcp_specifics
mov dword [ebp - 0x216c], 0
mov dword [ebp - 0x2168], 2
add esp, 0x10
mov eax, dword [ebp + 8]
lea ebx, [ebp - 0x1149]
test eax, eax
je 0x408a72
mov ecx, dword [ebp + 0xc]
mov edi, str.devices
cld
mov ecx, dword [ecx]
mov dword [ebp - 0x2158], ecx
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40927e
cld
mov edi, str.connect
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40920d
cld
mov edi, str.disconnect
mov ecx, 0xb
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x409223
cld
mov edi, 0x429a59
mov ecx, 4
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x4092d4
cld
mov edi, str.shell
mov ecx, 6
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x408aa2
mov edi, str.hell
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x408aa2
cld
mov edi, str.kill_server
mov ecx, 0xc
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x4090af
cld
mov edi, str.get_ran
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x4090d2
cld
mov edi, str.set_ran
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40911a
cld
mov edi, str.sideload
mov ecx, 9
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x4091de
cld
mov edi, str.remount
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x408d0a
mov edi, str.reboot
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x408d0a
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x408d23
mov edi, str.tcpip
mov ecx, 6
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40897e
mov edi, 0x429bdf
mov ecx, 4
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40897e
mov edi, str.root
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40897e
mov edi, str.passwd
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40897e
cld
mov edi, str.bugreport
mov ecx, 0xa
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40934a
cld
mov edi, 0x429c1b
mov ecx, 9
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x408c8b
mov edi, str.wait_for_device
mov ecx, 0xf
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x408706
mov eax, dword [ebp - 0x2168]
mov dword [ebp - 0x2158], str.wait_for_usb
test eax, eax
je 0x408706
mov dword [ebp - 0x2158], str.wait_for_local
cmp dword [ebp - 0x2168], 1
je 0x408706
mov dword [ebp - 0x2158], str.wait_for_any
push edi
push edi
mov esi, dword [ebp - 0x2164]
mov edx, 0x1000
push esi
mov eax, ebx
mov ecx, dword [ebp - 0x2168]
push ecx
mov ecx, dword [ebp - 0x2158]
call dbg.format_host_command
mov dword [esp], ebx
call dbg.adb_command
add esp, 0x10
test eax, eax
jne 0x409315
cmp dword [ebp + 8], 1
jle 0x408d03
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [ebp + 0xc], eax
jmp 0x4084e2
cld
mov edi, 0x429836
mov ecx, 2
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4088f9
cmp byte [ebx + 2], 0
jne 0x408a43
cmp dword [ebp + 8], 1
je 0x408a72
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 8]
add esi, 4
dec ebx
mov dword [ebp + 0xc], esi
mov edx, dword [ebp + 0xc]
mov esi, dword [edx]
mov dword [ebp + 8], ebx
test esi, esi
je 0x409440
mov al, byte [esi]
test al, al
je 0x409440
movsx edx, al
mov eax, dword [sym.imp.msvcrt.dll___mb_cur_max]
cmp dword [eax], 1
jne 0x408a51
mov eax, dword [sym.imp.msvcrt.dll__pctype]
mov eax, dword [eax]
mov ax, word [eax + edx*2]
and eax, 0x103
test eax, eax
je 0x4087d9
cmp byte [esi + 1], 0x3a
je 0x408d3f
push ebx
push ebx
push 0x2f
push esi
call sym._strchr
pop edx
pop ecx
mov ebx, eax
push 0x5c
push esi
call sym._strchr
add esp, 0x10
test ebx, ebx
je 0x4087fe
test eax, eax
je 0x408806
cmp eax, ebx
jbe 0x408806
test eax, eax
je 0x409380
push eax
push eax
push 0x103
push 0x4310a0
call sym._getcwd
add esp, 0x10
test eax, eax
je 0x409595
mov ebx, 0x4310a0
mov eax, dword [ebx]
add ebx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x408827
test edx, 0x8080
je 0x408bb9
add dl, dl
sbb ebx, 3
sub esp, 0xc
sub ebx, 0x4310a0
push esi
call sym._strlen
add esp, 0x10
lea eax, [ebx + eax + 1]
cmp eax, 0x102
jbe 0x40892c
mov edi, dword [sym.imp.msvcrt.dll__iob]
push eax
push eax
push str.adb:_Couldnt_assemble_path_n
lea eax, [edi + 0x40]
push eax
call sym._fprintf_5
add esp, 0x10
mov dword [0x431080], 0
push eax
lea eax, [edi + 0x40]
push esi
push str.adb:_could_not_resolve___p__s__n
push eax
call sym._fprintf_5
call dbg.usage
add esp, 0x10
mov ebx, eax
jmp 0x408493
push eax
push 0
push 0
push ebx
call sym._strtol
add esp, 0x10
mov dword [ebp - 0x2160], eax
test eax, eax
jg 0x408331
mov eax, dword [sym.imp.msvcrt.dll__iob]
push edi
add eax, 0x40
push ebx
push str.adb:_Env_var_ANDROID_ADB_SERVER_PORT_must_be_a_positive_number._Got___s__n
jmp 0x40889e
sub esp, 0xc
mov edi, dword [ebp - 0x2160]
push edi
call dbg.launch_server
add esp, 0x10
mov ebx, eax
jmp 0x408477
cmp byte [ebx], 0x2d
jne 0x408908
cmp byte [ebx + 1], 0x73
je 0x409062
cld
mov edi, 0x429970
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x408a7e
mov dword [ebp - 0x2168], 0
jmp 0x40837a
mov ecx, 0x4310a0
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x408931
test edx, 0x8080
je 0x408bae
add dl, dl
sbb ecx, 3
mov word [ecx], 0x5c
push eax
push eax
push esi
push 0x4310a0
call sym._strcat
add esp, 0x10
mov dword [0x431080], 0x4310a0
jmp 0x40837a
cmp dword [ebp + 8], 1
jle 0x409304
cld
mov edi, str.passwd
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x408bc4
sub esp, 0xc
push 0
call sym._time
mov dword [esp], eax
call sym._srand
call sym._rand
add esp, 0x10
shr al, 3
mov edi, eax
cmp al, 4
ja 0x4089c9
mov edi, 5
mov edx, dword [ebp + 0xc]
xor esi, esi
add edx, 4
mov dword [ebp - 0x2150], edx
jmp 0x4089df
mov ecx, edi
add byte [esi + ebx], cl
inc esi
mov eax, dword [ebp - 0x2150]
sub esp, 0xc
mov ebx, dword [eax]
push ebx
call sym._strlen
add esp, 0x10
cmp esi, eax
jb 0x4089d9
push eax
lea esi, [ebp - 0x46]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
push eax
mov eax, edi
and eax, 0xff
push ebx
push eax
lea ebx, [ebp - 0x2149]
mov eax, dword [edx]
push eax
push str._s:_02x_s_s
push 0x32
push ebx
call sym.___mingw_snprintf
add esp, 0x1c
push esi
push eax
push ebx
call sym._strlen
pop ecx
pop edi
push eax
push ebx
call dbg.base64_encode
mov dword [esp], esi
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx]
push edx
jmp 0x408bd5
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 4]
add esi, 2
jmp 0x408798
push ecx
push ecx
push 0x103
push edx
call sym.__isctype
add esp, 0x10
jmp 0x4087cb
xor esi, esi
cmp dword [ebp + 8], 2
je 0x409a39
call dbg.usage
mov ebx, eax
jmp 0x408493
cld
mov edi, 0x429973
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x408418
mov dword [ebp - 0x2168], 1
jmp 0x40837a
mov ecx, dword [ebp - 0x2158]
cmp byte [ecx], 0x68
sete byte [ebp - 0x2159]
je 0x408c66
cmp dword [ebp + 8], 1
jle 0x408c20
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x1149]
mov eax, dword [eax + 4]
push eax
push str.shell:_s
push 0x1000
push edx
call sym.___mingw_snprintf
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
sub edi, 2
add esi, 0xc
add esp, 0x10
jmp 0x408b4f
push eax
push eax
push 0x20
push ebx
call sym._strchr
add esp, 0x10
test eax, eax
je 0x4092ed
sub esp, 0xc
lea edx, [ebp - 0x1149]
push edx
call sym._strlen
pop edx
pop ecx
lea ecx, [ebp - 0x1149]
mov word [ebp + eax - 0x1149], 0x22
push ebx
push ecx
call sym._strcat
add esp, 0x10
sub esp, 0xc
lea ecx, [ebp - 0x1149]
push ecx
call sym._strlen
add esp, 0x10
mov word [ebp + eax - 0x1149], 0x22
add esi, 4
dec edi
cmp edi, 0xffffffff
je 0x408d5e
sub esp, 0xc
lea ecx, [ebp - 0x1149]
push ecx
call sym._strlen
add esp, 0x10
mov word [ebp + eax - 0x1149], 0x20
mov ebx, dword [esi - 4]
cmp byte [ebx], 0
jne 0x408af0
sub esp, 0xc
lea eax, [ebp - 0x1149]
push eax
call sym._strlen
pop edx
lea edx, [ebp - 0x1149]
pop ecx
mov word [ebp + eax - 0x1149], 0x22
push ebx
push edx
call sym._strcat
add esp, 0x10
jmp 0x408b30
shr edx, 0x10
add ecx, 2
jmp 0x408955
shr edx, 0x10
add ebx, 2
jmp 0x40884b
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp - 0x2158]
push eax
lea ebx, [ebp - 0x149]
push str._s:_s
push 0x64
push ebx
call sym.___mingw_snprintf
add esp, 0x20
sub esp, 0xc
push ebx
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x408f6e
mov eax, ebx
call dbg.read_and_dump
sub esp, 0xc
push ebx
call dbg.adb_close
xor ebx, ebx
add esp, 0x10
mov eax, ebx
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test byte [0x443b68], 1
jne 0x40965c
call dbg.interactive_shell
cmp byte [ebp - 0x2159], 0
mov ebx, eax
je 0x408493
sub esp, 0xc
push str.e_0m
call sym._printf_1
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fflush
add esp, 0x10
jmp 0x408493
sub esp, 0xc
push str.e_41_33m
call sym._printf_1
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fflush
add esp, 0x10
jmp 0x408ab8
cld
mov edi, str.forward
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409559
cmp dword [ebp + 8], 3
jne 0x408a72
mov eax, dword [ebp - 0x2164]
test eax, eax
je 0x40980c
push eax
push eax
mov edx, dword [ebp + 0xc]
mov edi, dword [edx + 8]
push edi
mov esi, dword [edx + 4]
push esi
mov ebx, dword [ebp - 0x2164]
push ebx
push str.host_serial:_s:forward:_s__s
lea ecx, [ebp - 0x1149]
push 0x1000
push ecx
call sym.___mingw_snprintf
add esp, 0x20
sub esp, 0xc
lea eax, [ebp - 0x1149]
push eax
call dbg.adb_command
add esp, 0x10
test eax, eax
jne 0x408f6e
xor ebx, ebx
jmp 0x408493
cld
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40897e
push eax
push str.reboot:bootloader
lea ebx, [ebp - 0x149]
push 0x64
push ebx
call sym.___mingw_snprintf
add esp, 0x10
jmp 0x408beb
cmp byte [esi + 2], 0x5c
jne 0x4087d9
push edx
push edx
push esi
push 0x4310a0
call sym._strcpy
add esp, 0x10
jmp 0x40896f
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [ebp - 0x2184], eax
jmp 0x408e0b
sub esp, 0xc
lea ecx, [ebp - 0x1149]
push ecx
call dbg.adb_connect
add esp, 0x10
mov edi, eax
test eax, eax
js 0x40903d
test byte [0x443b68], 1
jne 0x408f00
mov eax, edi
call dbg.read_and_dump
test byte [0x443b68], 1
jne 0x408e94
sub esp, 0xc
push edi
xor edi, edi
call dbg.adb_close
add esp, 0x10
mov eax, dword [ebp - 0x216c]
test eax, eax
je 0x408f95
push eax
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push str._n__waiting_for_device___n
add eax, 0x40
push eax
call sym._fprintf_5
mov dword [esp], 0x3e8
call sub.KERNEL32.dll_Sleep
add esp, 0xc
push 0
push str.wait_for_device
mov eax, dword [ebp - 0x2164]
push eax
mov eax, dword [ebp - 0x2168]
push eax
call dbg.do_cmd
add esp, 0x10
test byte [0x443b68], 1
je 0x408d71
call sym.__errno
sub esp, 0xc
mov ebx, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
mov eax, dword [ebp - 0x2184]
push eax
call sym._fprintf_5
call sym.__errno
add esp, 0xc
lea edx, [ebp - 0x1149]
mov dword [eax], ebx
push edx
push str.interactive_shell_loop._buff_s_n
mov eax, dword [ebp - 0x2184]
push eax
call sym._fprintf_5
pop eax
mov eax, dword [ebp - 0x2184]
push eax
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], ebx
jmp 0x408d71
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
mov dword [eax], esi
pop ecx
pop eax
push str.read_and_dump___done._n
push ebx
call sym._fprintf_5
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x408dae
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.about_to_read_and_dump_fd_d__n
push ebx
call sym._fprintf_5
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x408d9a
call dbg.adb_error
push edx
push eax
push 0x42965f
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add eax, 0x40
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x408493
cmp byte [ebp - 0x2159], 0
je 0x408fbe
sub esp, 0xc
push str.e_0m
call sym._printf_1
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
mov dword [esp], eax
call sym._fflush
add esp, 0x10
mov ebx, edi
test byte [0x443b68], 1
je 0x408493
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
add esp, 0xc
mov dword [eax], esi
push edi
push str.interactive_shell_loop._return_r_d_n
push ebx
call sym._fprintf_5
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
mov ebx, edi
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x408493
call dbg.adb_error
or edi, 0xffffffff
push edx
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push 0x42965f
add eax, 0x40
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x408dbc
lea ecx, [ebx + 2]
mov dword [ebp - 0x2164], ecx
mov dl, byte [ebx + 2]
movsx eax, dl
sub eax, 0x30
cmp eax, 9
jbe 0x40837a
cmp dword [ebp + 8], 1
je 0x408a72
test dl, dl
jne 0x408a72
mov eax, dword [ebp + 0xc]
add eax, 4
mov dword [ebp + 0xc], eax
mov eax, dword [ebp + 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x2164], eax
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
jmp 0x40837a
sub esp, 0xc
push 0x429b51
call dbg._adb_connect
add esp, 0x10
inc eax
jne 0x408d03
push eax
push eax
push str._server_not_running__n
jmp 0x408f7a
lea ebx, [ebp - 0x2149]
push eax
push str.rand:get
push 0x64
push ebx
call sym.___mingw_snprintf
mov dword [esp], ebx
call dbg._adb_connect
add esp, 0x10
mov esi, eax
test eax, eax
js 0x409110
push edi
push 0xa
push 0x431090
push eax
call dbg.adb_read
add esp, 0x10
test eax, eax
jne 0x409503
mov ebx, 1
jmp 0x408493
sub esp, 0xc
lea eax, [ebp - 0x46]
push eax
call sub.KERNEL32.dll_GetLocalTime
mov eax, dword [ebp - 0x3c]
sub esp, 0xc
and eax, 0xffff
push eax
mov ax, word [ebp - 0x3e]
and eax, 0xffff
push eax
mov eax, dword [ebp - 0x40]
and eax, 0xffff
push eax
lea eax, [ebp - 0x2149]
push str._02d_02d_02d
push 0xa
push eax
call sym.___mingw_snprintf
add esp, 0x30
cmp dword [ebp + 8], 1
jle 0x4096c8
mov esi, dword [ebp + 0xc]
mov ebx, 1
add esi, 4
jmp 0x409178
mov al, byte [edi]
add byte [edi + ebx], al
inc ebx
sub esp, 0xc
mov edi, dword [esi]
push edi
call sym._strlen
add esp, 0x10
cmp ebx, eax
jb 0x409172
cmp dword [ebp + 8], 2
je 0x409110
mov bx, word [ebp - 0x3e]
test bx, bx
je 0x40948c
mov eax, dword [ebp + 0xc]
mov ecx, dword [eax + 8]
mov al, byte [ecx]
cmp al, byte [ebp - 0x2149]
jne 0x4091bc
mov al, byte [ecx + 1]
cmp al, byte [ebp - 0x2148]
je 0x4096d3
push ebx
push ebx
push 0x429b99
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add eax, 0x20
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x408493
cmp dword [ebp + 8], 2
jne 0x408a72
push edx
push 1
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
push str.sideload
call dbg.adb_download
add esp, 0x10
test eax, eax
setne al
xor ebx, ebx
mov bl, al
jmp 0x408493
cmp dword [ebp + 8], 2
je 0x40944b
push eax
push eax
push str.Usage:_adb_connect__host__:_port___n
jmp 0x408f7a
cmp dword [ebp + 8], 2
jg 0x409480
je 0x409534
lea eax, [ebp - 0x1149]
push edi
push str.host:disconnect:
push 0x1000
push eax
call sym.___mingw_snprintf
add esp, 0x10
sub esp, 0xc
lea edx, [ebp - 0x1149]
push edx
call dbg.adb_query
add esp, 0x10
test eax, eax
je 0x409110
push edx
push edx
push eax
push 0x4299bd
call sym._printf_1
xor ebx, ebx
add esp, 0x10
jmp 0x408493
mov ecx, dword [ebp - 0x2158]
lea ebx, [ebp - 0x1149]
push ecx
push 0x42999a
push 0x1000
push ebx
call sym.___mingw_snprintf
mov dword [esp], ebx
call dbg.adb_query
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x409110
sub esp, 0xc
push str.List_of_devices_attached__n
call sym._printf_1
pop eax
pop edx
push ebx
push 0x4299bd
call sym._printf_1
xor ebx, ebx
add esp, 0x10
jmp 0x408493
push esi
push esi
mov ebx, dword [ebp + 0xc]
push ebx
mov ecx, dword [ebp + 8]
push ecx
call dbg.adb_send_emulator_command
add esp, 0x10
mov ebx, eax
jmp 0x408493
push eax
push eax
lea eax, [ebp - 0x1149]
push ebx
push eax
call sym._strcat
add esp, 0x10
jmp 0x408b4c
mov eax, dword [ebp - 0x2158]
push eax
push 0x429c0d
jmp 0x408d29
test byte [0x443b68], 1
jne 0x4095c5
mov edi, dword [sym.imp.msvcrt.dll__iob]
call dbg.adb_error
mov ebx, 1
push edx
push eax
lea eax, [edi + 0x40]
push 0x42965f
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x408493
cmp dword [ebp + 8], 1
jne 0x408a72
sub esp, 0xc
xor ebx, ebx
push 0
push str.bugreport
push str.shell
mov eax, dword [ebp - 0x2164]
push eax
mov eax, dword [ebp - 0x2168]
push eax
call dbg.do_cmd
add esp, 0x20
jmp 0x408493
sub esp, 0xc
push str.ANDROID_BUILD_TOP
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x40939f
cmp byte [eax], 0
jne 0x409638
sub esp, 0xc
push 0x4298ab
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x4093be
cmp byte [eax], 0
jne 0x409744
lea edi, [ebp - 0x2149]
push ebx
push ebx
push 0x103
push edi
call sym._getcwd
lea ebx, [ebp - 0x149]
mov edx, ebx
call dbg.find_top_from
add esp, 0x10
test eax, eax
je 0x40983f
sub esp, 0xc
push esi
push ebx
push str._sout_targetproduct_s
push 0x103
push 0x4310a0
call sym.___mingw_snprintf
add esp, 0x18
push 0
push 0x4310a0
call sym._access
add esp, 0x10
test eax, eax
jns 0x40896f
mov edi, dword [sym.imp.msvcrt.dll__iob]
push 0x4310a0
push esi
push str.adb:_Couldnt_find_a_product_dir_based_on___p__s_____s__doesnt_exist_n
lea eax, [edi + 0x40]
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x40888a
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x40888a
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x1149]
mov eax, dword [eax + 4]
push eax
push str.host:connect:_s
push 0x1000
push ebx
call sym.___mingw_snprintf
mov dword [esp], ebx
call dbg.adb_query
add esp, 0x10
test eax, eax
jne 0x409267
jmp 0x409110
push eax
push eax
push str.Usage:_adb_disconnect___host__:_port____n
jmp 0x408f7a
mov edx, dword [ebp + 0xc]
mov ecx, dword [edx + 8]
movsx eax, byte [ecx + 2]
movsx edx, byte [ecx + 3]
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x1e0]
cmp eax, 0x30
je 0x4097bd
cmp eax, 0x3b
je 0x4094bb
cmp eax, 0x47
jne 0x4091bc
mov al, byte [ecx]
cmp al, byte [ebp - 0x2149]
je 0x4097a9
lea ebx, [ebp - 0x149]
push edi
push str.rand:set_s
push 0x64
push ebx
call sym.___mingw_snprintf
mov dword [esp], ebx
call dbg._adb_connect
add esp, 0x10
test eax, eax
js 0x40979d
sub esp, 0xc
xor ebx, ebx
push eax
call dbg.adb_close
add esp, 0x10
jmp 0x408493
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add ebx, 0x20
push ebx
push eax
push 1
push 0x431090
call sym._fwrite
mov dword [esp], ebx
call sym._fflush
mov dword [esp], esi
call dbg.adb_close
xor ebx, ebx
add esp, 0x10
jmp 0x408493
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x1149]
mov eax, dword [edx + 4]
push eax
push str.host:disconnect:_s
push 0x1000
push ecx
call sym.___mingw_snprintf
add esp, 0x10
jmp 0x40924d
cld
mov edi, 0x429cc5
mov ecx, 3
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40986f
cmp dword [ebp + 8], 2
jne 0x408a72
mov edx, dword [ebp + 0xc]
sub esp, 0xc
mov eax, dword [edx + 4]
push eax
call dbg.do_sync_ls
add esp, 0x10
mov ebx, eax
jmp 0x408493
call sym.__errno
sub esp, 0xc
mov eax, dword [eax]
push eax
call sym._strerror
add esp, 0xc
mov edi, dword [sym.imp.msvcrt.dll__iob]
push eax
lea eax, [edi + 0x40]
push str.adb:_Couldnt_get_CWD:__s_n
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x40888a
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov edi, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
lea ebx, [edi + 0x40]
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
mov dword [eax], esi
call dbg.adb_error
add esp, 0xc
push eax
push str.failure:__s__n
push ebx
call sym._fprintf_5
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x409328
call dbg.top_works
test eax, eax
je 0x409782
push ecx
push ecx
push ebx
lea ebx, [ebp - 0x149]
push ebx
call sym._strcpy
add esp, 0x10
jmp 0x4093e9
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push global___FUNCTION__.29
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
mov dword [eax], esi
pop eax
pop edx
push str.starting_interactive_shell_n
push ebx
call sym._fprintf_5
mov dword [esp], ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
jmp 0x408c2d
mov ecx, dword [ebp + 0xc]
mov edi, dword [ecx + 4]
jmp 0x4094c9
movsx eax, byte [ecx + 2]
movsx edx, byte [ecx + 3]
lea eax, [eax + eax*4]
lea eax, [edx + eax*2 - 0x1e0]
lea edx, [eax*4]
shl eax, 6
sub eax, edx
movsx edx, byte [ecx + 5]
lea esi, [eax - 0xb40]
movsx eax, byte [ecx + 4]
lea eax, [eax + eax*4]
lea ecx, [edx + eax*2 - 0x210]
mov edx, ebx
and edx, 0xffff
lea eax, [edx*4]
shl edx, 6
sub edx, eax
mov eax, dword [ebp - 0x3c]
and eax, 0xffff
add edx, eax
lea eax, [esi + ecx]
cmp eax, edx
jg 0x4091bc
sub edx, esi
sub edx, ecx
cmp edx, 5
jle 0x4094c9
jmp 0x4091bc
call dbg.top_works
test eax, eax
jne 0x409645
mov edi, dword [sym.imp.msvcrt.dll__iob]
push eax
push ebx
push str.adb:_bad_TOP_value___s__n
lea eax, [edi + 0x40]
push eax
call sym._fprintf_5
add esp, 0x10
push eax
push eax
lea eax, [edi + 0x40]
push str.adb:_Couldnt_find_top_of_build_tree_n
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x40888a
mov edi, dword [sym.imp.msvcrt.dll__iob]
push eax
push ebx
push str.adb:_bad_ANDROID_BUILD_TOP_value___s__n
lea eax, [edi + 0x40]
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x40976a
push ecx
push ecx
push str.FAIL1
jmp 0x4091c3
mov al, byte [ecx + 1]
cmp al, byte [ebp - 0x2148]
jne 0x4094c9
jmp 0x4091bc
mov al, byte [ecx]
cmp al, byte [ebp - 0x2149]
jne 0x4091bc
mov al, byte [ecx + 1]
cmp al, byte [ebp - 0x2148]
jne 0x4091bc
movsx edx, byte [ecx + 4]
movsx eax, byte [ecx + 5]
lea edx, [edx + edx*4]
lea edx, [eax + edx*2 - 0x210]
mov eax, dword [ebp - 0x3c]
and eax, 0xffff
cmp edx, eax
jg 0x4091bc
sub eax, edx
cmp eax, 5
jle 0x4094c9
jmp 0x4091bc
mov ecx, dword [ebp - 0x2168]
test ecx, ecx
je 0x4098d7
cmp dword [ebp - 0x2168], 1
je 0x4098ab
mov edx, dword [ebp + 0xc]
sub esp, 0xc
mov ebx, dword [edx + 8]
push ebx
mov ecx, dword [edx + 4]
push ecx
push str.host:forward:_s__s
jmp 0x408cd5
push edx
push edx
push 0x103
push edi
call dbg.get_my_path
lea edx, [ebp - 0x149]
mov eax, edi
call dbg.find_top_from
add esp, 0x10
test eax, eax
jne 0x4093e9
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x40976a
cld
mov edi, str.push
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409903
cmp dword [ebp + 8], 3
jne 0x408a72
push eax
push 0
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 8]
push eax
mov eax, dword [ecx + 4]
push eax
call dbg.do_sync_push
add esp, 0x10
mov ebx, eax
jmp 0x408493
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
lea eax, [ebp - 0x1149]
mov edi, dword [ecx + 8]
push edi
mov esi, dword [ecx + 4]
push esi
push str.host_local:forward:_s__s
push 0x1000
push eax
call sym.___mingw_snprintf
add esp, 0x20
jmp 0x408ce9
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov edx, dword [eax + 8]
push edx
lea edx, [ebp - 0x1149]
mov eax, dword [eax + 4]
push eax
push str.host_usb:forward:_s__s
push 0x1000
push edx
call sym.___mingw_snprintf
add esp, 0x20
jmp 0x408ce9
cld
mov edi, str.pull
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409944
cmp dword [ebp + 8], 2
je 0x409988
cmp dword [ebp + 8], 3
jne 0x408a72
push edi
push edi
mov edx, dword [ebp + 0xc]
mov esi, dword [edx + 8]
push esi
mov ebx, dword [edx + 4]
push ebx
call dbg.do_sync_pull
add esp, 0x10
mov ebx, eax
jmp 0x408493
cld
mov edi, str.install
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4099a5
cmp dword [ebp + 8], 1
jle 0x408a72
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x2164]
push eax
mov eax, dword [ebp - 0x2168]
push eax
call dbg.install_app
add esp, 0x10
mov ebx, eax
jmp 0x408493
push eax
push eax
push 0x429cd2
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 4]
push eax
call dbg.do_sync_pull
add esp, 0x10
mov ebx, eax
jmp 0x408493
cld
mov edi, str.uninstall
mov ecx, 0xa
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4099e9
cmp dword [ebp + 8], 1
jle 0x408a72
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x2164]
push eax
mov eax, dword [ebp - 0x2168]
push eax
call dbg.uninstall_app
add esp, 0x10
mov ebx, eax
jmp 0x408493
cld
mov edi, str.sync
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409a98
cmp dword [ebp + 8], 1
jle 0x409db7
mov ecx, dword [ebp + 0xc]
mov eax, 3
mov edi, 0x429ceb
mov ebx, dword [ecx + 4]
mov ecx, eax
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x408a66
cmp dword [ebp + 8], 3
je 0x409da7
xor ebx, ebx
mov esi, 1
lea eax, [ebp - 0x14]
push edi
push eax
lea eax, [ebp - 0x10]
push eax
push ebx
call dbg.find_sync_dirs
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x408a72
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x409d17
push ecx
push esi
push str._system
push eax
call dbg.do_sync_sync
add esp, 0x10
test eax, eax
je 0x409d17
mov ebx, eax
sub esp, 0xc
mov eax, dword [ebp - 0x10]
push eax
call sym._free
pop eax
mov eax, dword [ebp - 0x14]
push eax
call sym._free
add esp, 0x10
jmp 0x408493
cld
mov edi, str.get_state
mov ecx, 0xa
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x409ac1
mov edi, str.get_serialno
mov ecx, 0xd
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409aee
push edi
push edi
mov esi, dword [ebp - 0x2164]
lea ebx, [ebp - 0x1149]
push esi
mov edx, 0x1000
mov ecx, dword [ebp - 0x2168]
mov eax, ebx
push ecx
mov ecx, dword [ebp - 0x2158]
call dbg.format_host_command
jmp 0x409468
cld
mov edi, str.status_window
mov ecx, 0xe
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409be2
push eax
push eax
mov eax, dword [ebp - 0x2164]
mov ecx, str.get_state
push eax
mov edx, 0x1000
mov eax, dword [ebp - 0x2168]
xor ebx, ebx
push eax
lea eax, [ebp - 0x2149]
call dbg.format_host_command
mov edi, dword [sym.imp.msvcrt.dll__iob]
xor esi, esi
add esp, 0x10
add edi, 0x20
sub esp, 0xc
push 0xfa
call sub.KERNEL32.dll_Sleep
add esp, 0xc
test ebx, ebx
je 0x409b5c
sub esp, 0xc
push ebx
call sym._free
add esp, 0x10
sub esp, 0xc
lea edx, [ebp - 0x2149]
push edx
call dbg.adb_query
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x409d39
test esi, esi
je 0x409b98
push eax
push eax
push esi
push ebx
call sym._strcmp
add esp, 0x10
test eax, eax
je 0x409b3c
sub esp, 0xc
push esi
call sym._free
add esp, 0x10
sub esp, 0xc
push ebx
call sym._strdup
add esp, 0xc
mov esi, eax
push 0x1b
push 0x1b
push str._c_2J_c_2H
call sym._printf_1
mov dword [esp], str.Android_Debug_Bridge_n
call sym._printf_1
mov eax, ebx
add esp, 0x10
push edx
push edx
push eax
push str.State:__s_n
call sym._printf_1
mov dword [esp], edi
call sym._fflush
add esp, 0x10
jmp 0x409b3c
cld
mov edi, str.logcat
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x409c0f
mov edi, str.lolcat
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409d61
sub esp, 0xc
push str.ANDROID_LOG_TAGS
call sym._getenv
add esp, 0x10
test eax, eax
jne 0x409c28
mov eax, 0x429d7c
call dbg.dupAndQuote
lea ecx, [ebp - 0x2149]
push eax
mov ebx, eax
push str.shell:export_ANDROID_LOG_TAGS__s____exec_logcat
push 0x1000
push ecx
call sym.___mingw_snprintf
mov dword [esp], ebx
mov edi, str.longcat
call sym._free
mov eax, dword [ebp + 0xc]
cld
mov esi, dword [eax]
mov ecx, 8
repe cmpsb byte [esi], byte es:[edi]
seta dl
setb al
add esp, 0x10
cmp dl, al
jne 0x409c99
sub esp, 0xc
lea edx, [ebp - 0x2149]
push edx
call sym._strlen
lea ecx, [ebp - 0x2149]
add esp, 0x10
lea eax, [ecx + eax]
mov dword [eax], 0x20762d20
mov dword [eax + 4], 0x676e6f6c
mov byte [eax + 8], 0
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp - 0x2180], eax
test eax, eax
jle 0x409cf9
xor esi, esi
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + esi*4 + 4]
inc esi
call dbg.dupAndQuote
sub esp, 0xc
lea ecx, [ebp - 0x2149]
mov ebx, eax
push ecx
call sym._strlen
add esp, 0xc
mov word [ebp + eax - 0x2149], 0x20
lea eax, [ebp - 0x2149]
push 0xfff
push ebx
push eax
call sym._strncat
mov dword [esp], ebx
call sym._free
add esp, 0x10
cmp esi, dword [ebp - 0x2180]
jne 0x409ca9
lea ecx, [ebp - 0x2149]
mov edx, dword [ebp - 0x2164]
mov eax, dword [ebp - 0x2168]
xor ebx, ebx
call dbg.send_shellcommand
jmp 0x408493
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x409a7a
push edx
push esi
push str._data
push eax
call dbg.do_sync_sync
add esp, 0x10
mov ebx, eax
jmp 0x409a7a
push ecx
push 0x1b
push 0x1b
push str._c_2J_c_2H
call sym._printf_1
mov dword [esp], str.Android_Debug_Bridge_n
call sym._printf_1
mov eax, str.offline
add esp, 0x10
jmp 0x409bc5
mov ecx, 8
mov esi, dword [ebp - 0x2158]
mov edi, str.longcat
repe cmpsb byte [esi], byte es:[edi]
je 0x409c0f
cld
mov edi, 0x429db1
mov ecx, 4
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409dc0
push ebx
push ebx
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dbg.ppp
add esp, 0x10
mov ebx, eax
jmp 0x408493
mov eax, dword [ebp + 0xc]
mov esi, 1
mov ebx, dword [eax + 8]
jmp 0x409a39
xor ebx, ebx
xor esi, esi
jmp 0x409a39
cld
mov edi, str.start_server
mov ecx, 0xd
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409dec
sub esp, 0xc
push 0x429dc2
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
jmp 0x408493
cld
mov edi, 0x429dd4
mov ecx, 7
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x409f41
lea eax, [ebp - 0x46]
mov dword [ebp - 0x46], 0x61622f2e
mov dword [ebp - 0x42], 0x70756b63
mov dword [ebp - 0x3e], 0x62612e
cmp dword [ebp + 8], 1
jle 0x408a72
mov dword [ebp - 0x2154], eax
mov ebx, 1
lea edx, [ebx*4]
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x2188], edx
mov eax, 3
cld
mov edi, dword [ecx + edx]
mov esi, 0x429ddb
mov ecx, eax
repe cmpsb byte [esi], byte es:[edi]
jne 0x409eb1
mov eax, dword [ebp + 8]
dec eax
cmp eax, ebx
je 0x40a1c2
mov eax, dword [ebp - 0x2188]
mov edx, dword [ebp + 0xc]
mov eax, dword [eax + edx + 4]
mov dword [ebp - 0x2154], eax
lea eax, [ebx + 2]
cmp eax, dword [ebp + 8]
jg 0x409e9b
mov eax, dword [ebp - 0x2188]
add edx, eax
mov ecx, edx
inc ebx
mov eax, dword [edx + 8]
mov dword [ecx], eax
add edx, 4
lea eax, [ebx + 2]
add ecx, 4
cmp eax, dword [ebp + 8]
jle 0x409e87
mov eax, dword [ebp + 8]
mov ecx, dword [ebp + 0xc]
sub eax, 2
mov dword [ebp + 8], eax
mov edx, dword [ebp + 8]
mov dword [ecx + edx*4], 0
inc ebx
cmp dword [ebp + 8], ebx
jg 0x409e32
cmp dword [ebp + 8], 1
jle 0x408a72
sub esp, 0xc
mov eax, dword [ebp - 0x2154]
push eax
call sym._unlink
add esp, 0x10
inc eax
je 0x40a14b
mov ebx, dword [ebp - 0x2154]
inc ebx
push esi
push esi
push 0x2f
push ebx
call sym._strchr
pop edx
pop ecx
push 0x5c
mov esi, eax
push ebx
call sym._strchr
add esp, 0x10
mov ebx, eax
test esi, esi
je 0x409fcb
test eax, eax
je 0x409f14
cmp eax, esi
ja 0x409fcb
mov ebx, esi
sub esp, 0xc
mov byte [ebx], 0
mov edi, dword [ebp - 0x2154]
push edi
call sym.__mkdir
add esp, 0x10
mov byte [ebx], 0x5c
test eax, eax
jns 0x409ee4
call sym.__errno
cmp dword [eax], 0x11
je 0x409ee4
jmp 0x409fd3
cld
mov edi, str.restore
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a1d6
cmp dword [ebp + 8], 2
jne 0x408a72
mov ecx, dword [ebp + 0xc]
mov ebx, dword [ecx + 4]
push eax
push eax
push 0
push ebx
call dbg.adb_open
add esp, 0x10
mov edi, eax
test eax, eax
js 0x40a1b6
sub esp, 0xc
push str.restore:
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x40a18e
sub esp, 0xc
push str.Now_unlock_your_device_and_confirm_the_restore_operation._n
call sym._printf_1
mov edx, ebx
mov eax, edi
call dbg.copy_to_file
mov dword [esp], ebx
call dbg.adb_close
mov dword [esp], edi
call dbg.adb_close
xor ebx, ebx
add esp, 0x10
jmp 0x408493
test ebx, ebx
jne 0x409f16
push esi
push esi
push 0x1a0
mov ebx, dword [ebp - 0x2154]
push ebx
call dbg.adb_creat
add esp, 0x10
mov edi, eax
test eax, eax
js 0x40a125
push eax
lea eax, [ebp - 0x2149]
push 0x429dd4
push 0x1000
push eax
call sym.___mingw_snprintf
mov edx, dword [ebp + 8]
xor esi, esi
dec edx
add esp, 0x10
mov dword [ebp - 0x2180], edx
sub esp, 0xc
lea ecx, [ebp - 0x2149]
mov ebx, 0xfff
push ecx
call sym._strlen
add esp, 0xc
mov edx, ebx
sub edx, eax
lea ecx, [ebp - 0x2149]
push edx
push 0x429e1e
push ecx
call sym._strncat
lea eax, [ebp - 0x2149]
mov dword [esp], eax
call sym._strlen
add esp, 0xc
sub ebx, eax
lea ecx, [ebp - 0x2149]
push ebx
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + esi*4 + 4]
inc esi
push eax
push ecx
call sym._strncat
add esp, 0x10
cmp esi, dword [ebp - 0x2180]
jne 0x40a019
test byte [0x443b68], 1
je 0x40a0f7
call sym.__errno
sub esp, 0xc
mov esi, dword [eax]
push 0x443b48
call sub.KERNEL32.dll_EnterCriticalSection
mov ebx, dword [sym.imp.msvcrt.dll__iob]
add esp, 0xc
add ebx, 0x40
push str.backup
push str.system_core_adb_commandline.c
push 0x4294c7
push ebx
call sym._fprintf_5
call sym.__errno
mov dword [eax], esi
lea eax, [ebp - 0x2149]
push eax
mov eax, dword [ebp - 0x2154]
push eax
push str.backup._filename_s_buf_s_n
push ebx
call sym._fprintf_5
add esp, 0x14
push ebx
call sym._fflush
mov dword [esp], 0x443b48
call sub.KERNEL32.dll_LeaveCriticalSection
add esp, 0xc
call sym.__errno
mov dword [eax], esi
sub esp, 0xc
lea edx, [ebp - 0x2149]
push edx
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
js 0x40a18e
sub esp, 0xc
push str.Now_unlock_your_device_and_confirm_the_backup_operation._n
call sym._printf_1
mov edx, edi
mov eax, ebx
jmp 0x409fac
push ecx
mov edx, dword [ebp - 0x2154]
push edx
push str.adb:_unable_to_open_file__s_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
or ebx, 0xffffffff
add eax, 0x40
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x408493
call sym.__errno
cmp dword [eax], 0xd
jne 0x409ede
push eax
push eax
push 0x180
mov eax, dword [ebp - 0x2154]
push eax
call sym._chmod
add esp, 0x10
test eax, eax
jne 0x409ede
sub esp, 0xc
mov edi, dword [ebp - 0x2154]
push edi
call sym._unlink
add esp, 0x10
jmp 0x409ede
push eax
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push str.adb:_unable_to_connect_for_backup_n
add eax, 0x40
or ebx, 0xffffffff
push eax
call sym._fprintf_5
mov dword [esp], edi
call dbg.adb_close
add esp, 0x10
jmp 0x408493
push eax
push ebx
push str.adb:_unable_to_open_file__s_n
jmp 0x40a132
push eax
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
push str.adb:__f_passed_with_no_filename_n
add eax, 0x40
jmp 0x40889e
cld
mov edi, str.jdwp
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a216
sub esp, 0xc
push str.jdwp
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
jns 0x408c01
call dbg.adb_error
push esi
push eax
push 0x42965f
jmp 0x40a132
cld
mov edi, str.help
mov ecx, 5
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
je 0x40a23f
mov edi, 0x429ef1
mov ecx, 3
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a24b
call dbg.help
xor ebx, ebx
jmp 0x408493
cld
mov edi, str.version
mov ecx, 8
mov esi, dword [ebp - 0x2158]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40a27b
sub esp, 0xc
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x20
xor ebx, ebx
push eax
call dbg.version
add esp, 0x10
jmp 0x408493
call dbg.usage
mov ebx, 1
jmp 0x408493