Function at 0x405e10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0x213c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00412f70
sub esp, 0xc
push str.ANDROID_PRODUCT_OUT
call sym._getenv
add esp, 0x10
mov dword [0x422080], eax
test eax, eax
je 0x405f18
cmp byte [eax], 0
je 0x405f18
sub esp, 0xc
push str.ANDROID_SERIAL
call sym._getenv
mov dword [ebp - 0x212c], eax
mov dword [esp], str.ANDROID_ADB_SERVER_PORT
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x405e77
cmp byte [eax], 0
jne 0x4063a6
mov dword [ebp - 0x2128], 0x13ad
mov eax, dword [ebp + 8]
test eax, eax
jle 0x405fed
mov dword [ebp - 0x2140], 0
mov dword [ebp - 0x213c], 0
mov dword [ebp - 0x2138], 0
mov dword [ebp - 0x2134], 0
mov dword [ebp - 0x2130], 2
jmp 0x405ee5
mov dword [ebp - 0x2138], 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 0x405f68
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 0x405ec0
cld
mov edi, str.nodaemon
mov ecx, 9
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f27
mov dword [ebp - 0x2140], 1
jmp 0x405eca
mov dword [0x422080], 0
jmp 0x405e46
cld
mov edi, str.fork_server
mov ecx, 0xc
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f44
mov dword [ebp - 0x213c], 1
jmp 0x405eca
cld
mov edi, str.persist
mov ecx, 8
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40624d
mov dword [ebp - 0x2134], 1
jmp 0x405eca
push esi
push esi
mov ebx, dword [ebp - 0x212c]
push ebx
mov ecx, dword [ebp - 0x2130]
push ecx
call dbg.adb_set_transport
pop edx
mov eax, dword [ebp - 0x2128]
push eax
call dbg.adb_set_tcp_specifics
mov eax, dword [ebp - 0x2138]
add esp, 0x10
test eax, eax
je 0x406021
mov edx, dword [ebp - 0x213c]
or edx, dword [ebp - 0x2140]
je 0x4063d3
push eax
push eax
mov eax, dword [ebp - 0x2128]
push eax
mov eax, dword [ebp - 0x213c]
push eax
call dbg.adb_main
add esp, 0x10
mov ebx, eax
test ebx, ebx
je 0x405fe3
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 - 0x212c]
push eax
push 2
call dbg.adb_set_transport
pop eax
mov eax, dword [ebp - 0x2128]
push eax
call dbg.adb_set_tcp_specifics
mov dword [ebp - 0x2134], 0
mov dword [ebp - 0x2130], 2
add esp, 0x10
mov eax, dword [ebp + 8]
mov ebx, str.devices
test eax, eax
je 0x40651f
mov ecx, dword [ebp + 0xc]
mov edi, ebx
cld
mov ecx, dword [ecx]
mov dword [ebp - 0x2120], ecx
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40694d
cld
mov edi, str.connect
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x4068c3
cld
mov edi, str.disconnect
mov ecx, 0xb
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x4068d9
cld
mov edi, 0x41ce71
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406934
cld
mov edi, str.shell
mov ecx, 6
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40652b
mov edi, str.hell
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40652b
cld
mov edi, str.kill_server
mov ecx, 0xc
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40699f
cld
mov edi, str.remount
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406471
mov edi, str.reboot
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406471
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406637
mov edi, str.tcpip
mov ecx, 6
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40648a
mov edi, 0x41cf15
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40648a
mov edi, str.root
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40648a
cld
mov edi, str.bugreport
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406a31
cld
mov edi, 0x41cf3e
mov ecx, 9
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406677
mov edi, str.wait_for_device
mov ecx, 0xf
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4061ef
mov eax, dword [ebp - 0x2130]
mov dword [ebp - 0x2120], str.wait_for_usb
test eax, eax
je 0x4061ef
mov dword [ebp - 0x2120], str.wait_for_local
cmp dword [ebp - 0x2130], 1
je 0x4061ef
mov dword [ebp - 0x2120], str.wait_for_any
push eax
push eax
mov edi, dword [ebp - 0x212c]
mov edx, 0x1000
push edi
lea eax, [ebp - 0x1117]
mov esi, dword [ebp - 0x2130]
push esi
mov ecx, dword [ebp - 0x2120]
call dbg.format_host_command
lea ecx, [ebp - 0x1117]
mov dword [esp], ecx
call dbg.adb_command
add esp, 0x10
test eax, eax
jne 0x4069fc
cmp dword [ebp + 8], 1
jle 0x4066ef
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
dec edi
add esi, 4
mov dword [ebp + 8], edi
mov dword [ebp + 0xc], esi
jmp 0x406031
cld
mov edi, 0x41cc4e
mov ecx, 2
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4063ec
cmp byte [ebx + 2], 0
jne 0x4064f0
cmp dword [ebp + 8], 1
je 0x40651f
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 0x406a84
mov al, byte [esi]
test al, al
je 0x406a84
movsx edx, al
mov eax, dword [sym.imp.msvcrt.dll___mb_cur_max]
cmp dword [eax], 1
jne 0x4064fe
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 0x4062cc
cmp byte [esi + 1], 0x3a
je 0x406857
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 0x4062f1
test eax, eax
je 0x4062f9
cmp eax, ebx
jbe 0x4062f9
test eax, eax
je 0x406a8f
push eax
push eax
push 0x103
push 0x422090
call sym._getcwd
add esp, 0x10
test eax, eax
je 0x406b50
mov ebx, 0x422090
mov eax, dword [ebx]
add ebx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x40631a
test edx, 0x8080
je 0x406701
add dl, dl
sbb ebx, 3
sub esp, 0xc
sub ebx, 0x422090
push esi
call sym._strlen
add esp, 0x10
lea eax, [ebx + eax + 1]
cmp eax, 0x102
jbe 0x40641f
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 [0x422080], 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 0x405fe3
push eax
push 0
push 0
push ebx
call sym._strtol
add esp, 0x10
mov dword [ebp - 0x2128], eax
test eax, eax
jg 0x405e81
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 0x406391
sub esp, 0xc
mov edi, dword [ebp - 0x2128]
push edi
call dbg.launch_server
add esp, 0x10
mov ebx, eax
jmp 0x405fc7
cmp byte [ebx], 0x2d
jne 0x4063fb
cmp byte [ebx + 1], 0x73
je 0x406876
cld
mov edi, 0x41cd88
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x406653
mov dword [ebp - 0x2130], 0
jmp 0x405eca
mov ecx, 0x422090
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x406424
test edx, 0x8080
je 0x4066f6
add dl, dl
sbb ecx, 3
mov word [ecx], 0x5c
push eax
push eax
push esi
push 0x422090
call sym._strcat
add esp, 0x10
mov dword [0x422080], 0x422090
jmp 0x405eca
cld
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406637
cmp dword [ebp + 8], 1
jle 0x406a67
mov edx, dword [ebp + 0xc]
sub esp, 0xc
lea ebx, [ebp - 0x117]
mov edx, dword [edx + 4]
push edx
mov eax, dword [ebp - 0x2120]
push eax
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 0x406830
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
mov ecx, dword [ebp + 0xc]
mov esi, dword [ecx + 4]
add esi, 2
jmp 0x40628b
push ecx
push ecx
push 0x103
push edx
call sym.__isctype
add esp, 0x10
jmp 0x4062be
xor esi, esi
cmp dword [ebp + 8], 2
je 0x406eae
call dbg.usage
mov ebx, eax
jmp 0x405fe3
mov ecx, dword [ebp - 0x2120]
cmp byte [ecx], 0x68
sete byte [ebp - 0x2121]
je 0x40670c
cmp dword [ebp + 8], 1
jle 0x406731
mov eax, dword [ebp + 0xc]
lea edx, [ebp - 0x1117]
mov ebx, dword [eax + 4]
push ebx
push str.shell:_s
push 0x1000
push edx
call sym.___mingw_snprintf
mov esi, dword [ebp + 8]
mov edi, dword [ebp + 0xc]
sub esi, 2
add edi, 0xc
add esp, 0x10
jmp 0x4065d8
push ecx
push ecx
push 0x20
push ebx
call sym._strchr
add esp, 0x10
test eax, eax
je 0x406819
sub esp, 0xc
lea ecx, [ebp - 0x1117]
push ecx
call sym._strlen
pop edx
pop ecx
mov word [ebp + eax - 0x1117], 0x22
lea eax, [ebp - 0x1117]
push ebx
push eax
call sym._strcat
add esp, 0x10
sub esp, 0xc
lea ecx, [ebp - 0x1117]
push ecx
call sym._strlen
add esp, 0x10
mov word [ebp + eax - 0x1117], 0x22
add edi, 4
dec esi
cmp esi, 0xffffffff
je 0x40676a
sub esp, 0xc
lea ecx, [ebp - 0x1117]
push ecx
call sym._strlen
add esp, 0x10
mov word [ebp + eax - 0x1117], 0x20
mov ebx, dword [edi - 4]
cmp byte [ebx], 0
jne 0x406579
sub esp, 0xc
lea eax, [ebp - 0x1117]
push eax
call sym._strlen
pop ecx
pop edx
mov word [ebp + eax - 0x1117], 0x22
lea edx, [ebp - 0x1117]
push ebx
push edx
call sym._strcat
add esp, 0x10
jmp 0x4065b9
push ecx
push str.reboot:bootloader
lea ebx, [ebp - 0x117]
push 0x64
push ebx
call sym.___mingw_snprintf
add esp, 0x10
jmp 0x4064bb
cld
mov edi, 0x41cd8b
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f68
mov dword [ebp - 0x2130], 1
jmp 0x405eca
cld
mov edi, str.forward
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406c1f
cmp dword [ebp + 8], 3
jne 0x40651f
mov ebx, dword [ebp - 0x212c]
test ebx, ebx
je 0x406ba4
push ecx
push ecx
mov eax, dword [ebp + 0xc]
mov edx, dword [eax + 8]
push edx
mov eax, dword [eax + 4]
push eax
mov eax, dword [ebp - 0x212c]
push eax
push str.host_serial:_s:forward:_s__s
lea edx, [ebp - 0x1117]
push 0x1000
push edx
call sym.___mingw_snprintf
add esp, 0x20
sub esp, 0xc
lea ecx, [ebp - 0x1117]
push ecx
call dbg.adb_command
add esp, 0x10
test eax, eax
jne 0x406830
xor ebx, ebx
jmp 0x405fe3
shr edx, 0x10
add ecx, 2
jmp 0x406448
shr edx, 0x10
add ebx, 2
jmp 0x40633e
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 0x406541
call dbg.interactive_shell
cmp byte [ebp - 0x2121], 0
mov ebx, eax
je 0x405fe3
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 0x405fe3
mov edi, dword [sym.imp.msvcrt.dll__iob]
add edi, 0x40
jmp 0x4067d3
call dbg.read_and_dump
sub esp, 0xc
push ebx
xor esi, esi
call dbg.adb_close
add esp, 0x10
mov eax, dword [ebp - 0x2134]
test eax, eax
je 0x406805
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 - 0x212c]
push eax
mov esi, dword [ebp - 0x2130]
push esi
call dbg.do_cmd
add esp, 0x10
sub esp, 0xc
lea eax, [ebp - 0x1117]
push eax
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
jns 0x406775
call dbg.adb_error
or esi, 0xffffffff
push edx
push eax
push 0x41cb0e
push edi
call sym._fprintf_5
add esp, 0x10
jmp 0x406788
mov ebx, esi
cmp byte [ebp - 0x2121], 0
je 0x405fe3
jmp 0x406745
lea edx, [ebp - 0x1117]
push eax
push eax
push ebx
push edx
call sym._strcat
add esp, 0x10
jmp 0x4065d5
call dbg.adb_error
push edx
push eax
push 0x41cb0e
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add eax, 0x40
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x405fe3
cmp byte [esi + 2], 0x5c
jne 0x4062cc
push edx
push edx
push esi
push 0x422090
call sym._strcpy
add esp, 0x10
jmp 0x406462
lea ecx, [ebx + 2]
mov dword [ebp - 0x212c], ecx
mov dl, byte [ebx + 2]
movsx eax, dl
sub eax, 0x30
cmp eax, 9
jbe 0x405eca
cmp dword [ebp + 8], 1
je 0x40651f
test dl, dl
jne 0x40651f
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 - 0x212c], eax
mov eax, dword [ebp + 8]
dec eax
mov dword [ebp + 8], eax
jmp 0x405eca
cmp dword [ebp + 8], 2
je 0x4069c2
push eax
push eax
push str.Usage:_adb_connect__host__:_port___n
jmp 0x40683c
cmp dword [ebp + 8], 2
jg 0x406a78
je 0x406bd7
push eax
lea eax, [ebp - 0x1117]
push str.host:disconnect:
push 0x1000
push eax
call sym.___mingw_snprintf
add esp, 0x10
sub esp, 0xc
lea edx, [ebp - 0x1117]
push edx
call dbg.adb_query
add esp, 0x10
test eax, eax
je 0x4069f2
push edx
push edx
push eax
push 0x41cdd5
call sym._printf_1
xor ebx, ebx
add esp, 0x10
jmp 0x405fe3
push eax
push eax
mov edi, dword [ebp + 0xc]
push edi
mov esi, dword [ebp + 8]
push esi
call dbg.adb_send_emulator_command
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
mov ebx, dword [ebp - 0x2120]
push ebx
lea ebx, [ebp - 0x1117]
push 0x41cdb2
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 0x4069f2
sub esp, 0xc
push str.List_of_devices_attached__n
call sym._printf_1
pop edx
pop ecx
push ebx
push 0x41cdd5
call sym._printf_1
xor ebx, ebx
add esp, 0x10
jmp 0x405fe3
sub esp, 0xc
push 0x41cecc
call dbg._adb_connect
add esp, 0x10
inc eax
jne 0x4066ef
push ebx
push ebx
push str._server_not_running__n
jmp 0x40683c
mov eax, dword [ebp + 0xc]
lea ebx, [ebp - 0x1117]
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 0x40691d
mov ebx, 1
jmp 0x405fe3
test byte [0x434b38], 1
jne 0x406bfc
mov edi, dword [sym.imp.msvcrt.dll__iob]
call dbg.adb_error
mov ebx, 1
push edx
push eax
lea eax, [edi + 0x40]
push 0x41cb0e
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x405fe3
cmp dword [ebp + 8], 1
jne 0x40651f
sub esp, 0xc
xor ebx, ebx
push 0
push str.bugreport
push str.shell
mov eax, dword [ebp - 0x212c]
push eax
mov eax, dword [ebp - 0x2130]
push eax
call dbg.do_cmd
add esp, 0x20
jmp 0x405fe3
mov eax, dword [ebp - 0x2120]
push eax
push 0x41cf30
jmp 0x40663d
push eax
push eax
push str.Usage:_adb_disconnect___host__:_port____n
jmp 0x40683c
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x40637d
sub esp, 0xc
push str.ANDROID_BUILD_TOP
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x406aae
cmp byte [eax], 0
jne 0x406b80
sub esp, 0xc
push 0x41ccc3
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x406acd
cmp byte [eax], 0
jne 0x406cc8
lea edi, [ebp - 0x2117]
push ebx
push ebx
push 0x103
push edi
call sym._getcwd
lea ebx, [ebp - 0x117]
mov edx, ebx
call dbg.find_top_from
add esp, 0x10
test eax, eax
je 0x406d48
sub esp, 0xc
push esi
push ebx
push str._sout_targetproduct_s
push 0x103
push 0x422090
call sym.___mingw_snprintf
add esp, 0x18
push 0
push 0x422090
call sym._access
add esp, 0x10
test eax, eax
jns 0x406462
mov edi, dword [sym.imp.msvcrt.dll__iob]
push 0x422090
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 0x40637d
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 0x40637d
call dbg.top_works
test eax, eax
je 0x406c57
push ecx
push ecx
push ebx
lea ebx, [ebp - 0x117]
push ebx
call sym._strcpy
add esp, 0x10
jmp 0x406af8
mov eax, dword [ebp - 0x2130]
test eax, eax
je 0x406d1c
cmp dword [ebp - 0x2130], 1
je 0x406cf0
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov ebx, dword [eax + 8]
push ebx
mov ecx, dword [eax + 4]
push ecx
push str.host:forward:_s__s
jmp 0x4066c1
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x1117]
mov eax, dword [edx + 4]
push eax
push str.host:disconnect:_s
push 0x1000
push ecx
call sym.___mingw_snprintf
add esp, 0x10
jmp 0x406903
call dbg.adb_error
mov edi, dword [sym.imp.msvcrt.dll__iob]
push ecx
push eax
lea eax, [edi + 0x40]
push str.failure:__s__n
push eax
call sym._fprintf_5
add esp, 0x10
jmp 0x406a0f
cld
mov edi, 0x41cfe8
mov ecx, 3
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406c88
cmp dword [ebp + 8], 2
jne 0x40651f
mov eax, dword [ebp + 0xc]
sub esp, 0xc
mov eax, dword [eax + 4]
push eax
call dbg.do_sync_ls
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
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
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 0x40637d
cld
mov edi, str.push
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406d78
cmp dword [ebp + 8], 3
jne 0x40651f
push eax
push 0
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + 8]
push eax
mov eax, dword [edx + 4]
push eax
call dbg.do_sync_push
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
call dbg.top_works
test eax, eax
jne 0x406b8d
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
jmp 0x406c70
mov edx, dword [ebp + 0xc]
sub esp, 0xc
lea ecx, [ebp - 0x1117]
mov edi, dword [edx + 8]
push edi
mov esi, dword [edx + 4]
push esi
push str.host_local:forward:_s__s
push 0x1000
push ecx
call sym.___mingw_snprintf
add esp, 0x20
jmp 0x4066d5
mov ecx, dword [ebp + 0xc]
sub esp, 0xc
mov eax, dword [ecx + 8]
push eax
mov eax, dword [ecx + 4]
push eax
lea eax, [ebp - 0x1117]
push str.host_usb:forward:_s__s
push 0x1000
push eax
call sym.___mingw_snprintf
add esp, 0x20
jmp 0x4066d5
push edx
push edx
push 0x103
push edi
call dbg.get_my_path
lea edx, [ebp - 0x117]
mov eax, edi
call dbg.find_top_from
add esp, 0x10
test eax, eax
jne 0x406af8
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x406c70
cld
mov edi, str.pull
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406db9
cmp dword [ebp + 8], 2
je 0x406dfd
cmp dword [ebp + 8], 3
jne 0x40651f
push edi
push edi
mov eax, dword [ebp + 0xc]
mov esi, dword [eax + 8]
push esi
mov ebx, dword [eax + 4]
push ebx
call dbg.do_sync_pull
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
cld
mov edi, str.install
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406e1a
cmp dword [ebp + 8], 1
jle 0x40651f
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x212c]
push eax
mov eax, dword [ebp - 0x2130]
push eax
call dbg.install_app
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
push eax
push eax
push 0x41cff5
mov ecx, dword [ebp + 0xc]
mov eax, dword [ecx + 4]
push eax
call dbg.do_sync_pull
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
cld
mov edi, str.uninstall
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406e5e
cmp dword [ebp + 8], 1
jle 0x40651f
mov eax, dword [ebp + 0xc]
push eax
mov eax, dword [ebp + 8]
push eax
mov eax, dword [ebp - 0x212c]
push eax
mov eax, dword [ebp - 0x2130]
push eax
call dbg.uninstall_app
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
cld
mov edi, str.sync
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406f0d
cmp dword [ebp + 8], 1
jle 0x4071c8
mov edx, dword [ebp + 0xc]
mov eax, 3
mov edi, 0x41d00e
mov ecx, eax
mov ebx, dword [edx + 4]
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x406513
cmp dword [ebp + 8], 3
je 0x4071b8
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 0x40651f
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x407112
push ecx
push esi
push str._system
push eax
call dbg.do_sync_sync
add esp, 0x10
test eax, eax
je 0x407112
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 0x405fe3
cld
mov edi, str.get_state
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406f36
mov edi, str.get_serialno
mov ecx, 0xd
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406f63
push edi
push edi
mov esi, dword [ebp - 0x212c]
lea ebx, [ebp - 0x1117]
push esi
mov edx, 0x1000
mov ecx, dword [ebp - 0x2130]
mov eax, ebx
push ecx
mov ecx, dword [ebp - 0x2120]
call dbg.format_host_command
jmp 0x4069df
cld
mov edi, str.status_window
mov ecx, 0xe
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40702f
push eax
push eax
mov eax, dword [ebp - 0x212c]
mov ecx, str.get_state
push eax
mov edx, 0x1000
mov eax, dword [ebp - 0x2130]
xor ebx, ebx
push eax
lea eax, [ebp - 0x2117]
call dbg.format_host_command
mov edi, dword [sym.imp.msvcrt.dll__iob]
xor esi, esi
add esp, 0x10
add edi, 0x20
jmp 0x406fcf
test esi, esi
je 0x407140
push eax
push eax
push esi
push ebx
call sym._strcmp
add esp, 0x10
test eax, eax
jne 0x407134
sub esp, 0xc
push 0xfa
call sub.KERNEL32.dll_Sleep
add esp, 0xc
test ebx, ebx
je 0x406fef
sub esp, 0xc
push ebx
call sym._free
add esp, 0x10
sub esp, 0xc
lea edx, [ebp - 0x2117]
push edx
call dbg.adb_query
add esp, 0x10
mov ebx, eax
test eax, eax
jne 0x406fb3
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 0x40716d
cld
mov edi, str.logcat
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40705c
mov edi, str.lolcat
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40718a
sub esp, 0xc
push str.ANDROID_LOG_TAGS
call sym._getenv
add esp, 0x10
test eax, eax
jne 0x407075
mov eax, 0x41d097
call dbg.dupAndQuote
lea ecx, [ebp - 0x2117]
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
call sym._free
mov edi, dword [ebp + 8]
dec edi
add esp, 0x10
test edi, edi
jle 0x4070f4
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 - 0x2117]
mov ebx, eax
push ecx
call sym._strlen
add esp, 0xc
mov word [ebp + eax - 0x2117], 0x20
lea eax, [ebp - 0x2117]
push 0xfff
push ebx
push eax
call sym._strncat
mov dword [esp], ebx
call sym._free
add esp, 0x10
cmp esi, edi
jne 0x4070a8
lea ecx, [ebp - 0x2117]
mov edx, dword [ebp - 0x212c]
mov eax, dword [ebp - 0x2130]
xor ebx, ebx
call dbg.send_shellcommand
jmp 0x405fe3
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x406eef
push edx
push esi
push str._data
push eax
call dbg.do_sync_sync
add esp, 0x10
mov ebx, eax
jmp 0x406eef
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 0x406fcf
cld
mov edi, 0x41d0c9
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4071d1
push eax
push eax
mov eax, dword [ebp + 0xc]
push eax
mov edi, dword [ebp + 8]
push edi
call dbg.ppp
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
mov eax, dword [ebp + 0xc]
mov esi, 1
mov ebx, dword [eax + 8]
jmp 0x406eae
xor ebx, ebx
xor esi, esi
jmp 0x406eae
cld
mov edi, str.start_server
mov ecx, 0xd
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4071fd
sub esp, 0xc
push 0x41d0da
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
jmp 0x405fe3
cld
mov edi, str.jdwp
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x407251
sub esp, 0xc
push str.jdwp
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
jns 0x4064d1
call dbg.adb_error
push esi
push eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
push 0x41cb0e
push eax
call sym._fprintf_5
or ebx, 0xffffffff
add esp, 0x10
jmp 0x405fe3
cld
mov edi, str.help
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40727a
mov edi, 0x41d0f6
mov ecx, 3
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x407286
call dbg.help
xor ebx, ebx
jmp 0x405fe3
cld
mov edi, str.version
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4072b6
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 0x405fe3
call dbg.usage
mov ebx, 1
jmp 0x405fe3