Function at 0x405df0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov eax, 0x213c
mov ebp, esp
push edi
push esi
push ebx
call fcn.00412fe0
sub esp, 0xc
push str.ANDROID_PRODUCT_OUT
call sym._getenv
add esp, 0x10
mov dword [0x422080], eax
test eax, eax
je 0x405ef8
cmp byte [eax], 0
je 0x405ef8
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 0x405e57
cmp byte [eax], 0
jne 0x406386
mov dword [ebp - 0x2128], 0x13ad
mov eax, dword [ebp + 8]
test eax, eax
jle 0x405fcd
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 0x405ec5
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 0x405f48
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 0x405ea0
cld
mov edi, str.nodaemon
mov ecx, 9
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f07
mov dword [ebp - 0x2140], 1
jmp 0x405eaa
mov dword [0x422080], 0
jmp 0x405e26
cld
mov edi, str.fork_server
mov ecx, 0xc
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f24
mov dword [ebp - 0x213c], 1
jmp 0x405eaa
cld
mov edi, str.persist
mov ecx, 8
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x40622d
mov dword [ebp - 0x2134], 1
jmp 0x405eaa
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 0x406001
mov edx, dword [ebp - 0x213c]
or edx, dword [ebp - 0x2140]
je 0x4063b3
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 0x405fc3
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 0x4064ff
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 0x40692d
cld
mov edi, str.connect
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x4068a3
cld
mov edi, str.disconnect
mov ecx, 0xb
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x4068b9
cld
mov edi, 0x41ce71
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406914
cld
mov edi, str.shell
mov ecx, 6
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40650b
mov edi, str.hell
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40650b
cld
mov edi, str.kill_server
mov ecx, 0xc
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40697f
cld
mov edi, str.remount
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406451
mov edi, str.reboot
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406451
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406617
mov edi, str.tcpip
mov ecx, 6
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40646a
mov edi, 0x41cf15
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40646a
mov edi, str.root
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40646a
cld
mov edi, str.bugreport
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406a11
cld
mov edi, 0x41cf3e
mov ecx, 9
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406657
mov edi, str.wait_for_device
mov ecx, 0xf
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4061cf
mov eax, dword [ebp - 0x2130]
mov dword [ebp - 0x2120], str.wait_for_usb
test eax, eax
je 0x4061cf
mov dword [ebp - 0x2120], str.wait_for_local
cmp dword [ebp - 0x2130], 1
je 0x4061cf
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 0x4069dc
cmp dword [ebp + 8], 1
jle 0x4066cf
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 0x406011
cld
mov edi, 0x41cc4e
mov ecx, 2
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4063cc
cmp byte [ebx + 2], 0
jne 0x4064d0
cmp dword [ebp + 8], 1
je 0x4064ff
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 0x406a64
mov al, byte [esi]
test al, al
je 0x406a64
movsx edx, al
mov eax, dword [sym.imp.msvcrt.dll___mb_cur_max]
cmp dword [eax], 1
jne 0x4064de
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 0x4062ac
cmp byte [esi + 1], 0x3a
je 0x406837
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 0x4062d1
test eax, eax
je 0x4062d9
cmp eax, ebx
jbe 0x4062d9
test eax, eax
je 0x406a6f
push eax
push eax
push 0x103
push 0x422090
call sym._getcwd
add esp, 0x10
test eax, eax
je 0x406b30
mov ebx, 0x422090
mov eax, dword [ebx]
add ebx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x4062fa
test edx, 0x8080
je 0x4066e1
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 0x4063ff
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 0x405fc3
push eax
push 0
push 0
push ebx
call sym._strtol
add esp, 0x10
mov dword [ebp - 0x2128], eax
test eax, eax
jg 0x405e61
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 0x406371
sub esp, 0xc
mov edi, dword [ebp - 0x2128]
push edi
call dbg.launch_server
add esp, 0x10
mov ebx, eax
jmp 0x405fa7
cmp byte [ebx], 0x2d
jne 0x4063db
cmp byte [ebx + 1], 0x73
je 0x406856
cld
mov edi, 0x41cd88
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x406633
mov dword [ebp - 0x2130], 0
jmp 0x405eaa
mov ecx, 0x422090
mov eax, dword [ecx]
add ecx, 4
lea edx, [eax - 0x1010101]
xor eax, 0xffffffff
and edx, eax
and edx, 0x80808080
je 0x406404
test edx, 0x8080
je 0x4066d6
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 0x405eaa
cld
mov edi, str.reboot_bootloader
mov ecx, 0x12
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406617
cmp dword [ebp + 8], 1
jle 0x406a47
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 0x406810
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 0x40626b
push ecx
push ecx
push 0x103
push edx
call sym.__isctype
add esp, 0x10
jmp 0x40629e
xor esi, esi
cmp dword [ebp + 8], 2
je 0x406e8e
call dbg.usage
mov ebx, eax
jmp 0x405fc3
mov ecx, dword [ebp - 0x2120]
cmp byte [ecx], 0x68
sete byte [ebp - 0x2121]
je 0x4066ec
cmp dword [ebp + 8], 1
jle 0x406711
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 0x4065b8
push ecx
push ecx
push 0x20
push ebx
call sym._strchr
add esp, 0x10
test eax, eax
je 0x4067f9
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 0x40674a
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 0x406559
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 0x406599
push ecx
push str.reboot:bootloader
lea ebx, [ebp - 0x117]
push 0x64
push ebx
call sym.___mingw_snprintf
add esp, 0x10
jmp 0x40649b
cld
mov edi, 0x41cd8b
mov ecx, 3
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x405f48
mov dword [ebp - 0x2130], 1
jmp 0x405eaa
cld
mov edi, str.forward
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406bff
cmp dword [ebp + 8], 3
jne 0x4064ff
mov ebx, dword [ebp - 0x212c]
test ebx, ebx
je 0x406b84
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 0x406810
xor ebx, ebx
jmp 0x405fc3
shr edx, 0x10
add ecx, 2
jmp 0x406428
shr edx, 0x10
add ebx, 2
jmp 0x40631e
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 0x406521
call dbg.interactive_shell
cmp byte [ebp - 0x2121], 0
mov ebx, eax
je 0x405fc3
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 0x405fc3
mov edi, dword [sym.imp.msvcrt.dll__iob]
add edi, 0x40
jmp 0x4067b3
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 0x4067e5
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 0x406755
call dbg.adb_error
or esi, 0xffffffff
push edx
push eax
push 0x41cb0e
push edi
call sym._fprintf_5
add esp, 0x10
jmp 0x406768
mov ebx, esi
cmp byte [ebp - 0x2121], 0
je 0x405fc3
jmp 0x406725
lea edx, [ebp - 0x1117]
push eax
push eax
push ebx
push edx
call sym._strcat
add esp, 0x10
jmp 0x4065b5
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 0x405fc3
cmp byte [esi + 2], 0x5c
jne 0x4062ac
push edx
push edx
push esi
push 0x422090
call sym._strcpy
add esp, 0x10
jmp 0x406442
lea ecx, [ebx + 2]
mov dword [ebp - 0x212c], ecx
mov dl, byte [ebx + 2]
movsx eax, dl
sub eax, 0x30
cmp eax, 9
jbe 0x405eaa
cmp dword [ebp + 8], 1
je 0x4064ff
test dl, dl
jne 0x4064ff
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 0x405eaa
cmp dword [ebp + 8], 2
je 0x4069a2
push eax
push eax
push str.Usage:_adb_connect__host__:_port___n
jmp 0x40681c
cmp dword [ebp + 8], 2
jg 0x406a58
je 0x406bb7
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 0x4069d2
push edx
push edx
push eax
push 0x41cdd5
call sym._printf_1
xor ebx, ebx
add esp, 0x10
jmp 0x405fc3
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 0x405fc3
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 0x4069d2
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 0x405fc3
sub esp, 0xc
push 0x41cecc
call dbg._adb_connect
add esp, 0x10
inc eax
jne 0x4066cf
push ebx
push ebx
push str._server_not_running__n
jmp 0x40681c
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 0x4068fd
mov ebx, 1
jmp 0x405fc3
test byte [0x434b38], 1
jne 0x406bdc
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 0x405fc3
cmp dword [ebp + 8], 1
jne 0x4064ff
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 0x405fc3
mov eax, dword [ebp - 0x2120]
push eax
push 0x41cf30
jmp 0x40661d
push eax
push eax
push str.Usage:_adb_disconnect___host__:_port____n
jmp 0x40681c
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x40635d
sub esp, 0xc
push str.ANDROID_BUILD_TOP
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x406a8e
cmp byte [eax], 0
jne 0x406b60
sub esp, 0xc
push 0x41ccc3
call sym._getenv
add esp, 0x10
mov ebx, eax
test eax, eax
je 0x406aad
cmp byte [eax], 0
jne 0x406ca8
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 0x406d28
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 0x406442
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 0x40635d
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 0x40635d
call dbg.top_works
test eax, eax
je 0x406c37
push ecx
push ecx
push ebx
lea ebx, [ebp - 0x117]
push ebx
call sym._strcpy
add esp, 0x10
jmp 0x406ad8
mov eax, dword [ebp - 0x2130]
test eax, eax
je 0x406cfc
cmp dword [ebp - 0x2130], 1
je 0x406cd0
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 0x4066a1
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 0x4068e3
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 0x4069ef
cld
mov edi, 0x41cfe8
mov ecx, 3
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406c68
cmp dword [ebp + 8], 2
jne 0x4064ff
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 0x405fc3
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 0x40635d
cld
mov edi, str.push
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406d58
cmp dword [ebp + 8], 3
jne 0x4064ff
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 0x405fc3
call dbg.top_works
test eax, eax
jne 0x406b6d
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 0x406c50
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 0x4066b5
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 0x4066b5
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 0x406ad8
mov edi, dword [sym.imp.msvcrt.dll__iob]
jmp 0x406c50
cld
mov edi, str.pull
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406d99
cmp dword [ebp + 8], 2
je 0x406ddd
cmp dword [ebp + 8], 3
jne 0x4064ff
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 0x405fc3
cld
mov edi, str.install
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406dfa
cmp dword [ebp + 8], 1
jle 0x4064ff
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 0x405fc3
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 0x405fc3
cld
mov edi, str.uninstall
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406e3e
cmp dword [ebp + 8], 1
jle 0x4064ff
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 0x405fc3
cld
mov edi, str.sync
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406eed
cmp dword [ebp + 8], 1
jle 0x4071a8
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 0x4064f3
cmp dword [ebp + 8], 3
je 0x407198
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 0x4064ff
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x4070f2
push ecx
push esi
push str._system
push eax
call dbg.do_sync_sync
add esp, 0x10
test eax, eax
je 0x4070f2
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 0x405fc3
cld
mov edi, str.get_state
mov ecx, 0xa
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x406f16
mov edi, str.get_serialno
mov ecx, 0xd
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x406f43
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 0x4069bf
cld
mov edi, str.status_window
mov ecx, 0xe
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40700f
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 0x406faf
test esi, esi
je 0x407120
push eax
push eax
push esi
push ebx
call sym._strcmp
add esp, 0x10
test eax, eax
jne 0x407114
sub esp, 0xc
push 0xfa
call sub.KERNEL32.dll_Sleep
add esp, 0xc
test ebx, ebx
je 0x406fcf
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 0x406f93
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 0x40714d
cld
mov edi, str.logcat
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40703c
mov edi, str.lolcat
mov ecx, 7
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x40716a
sub esp, 0xc
push str.ANDROID_LOG_TAGS
call sym._getenv
add esp, 0x10
test eax, eax
jne 0x407055
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 0x4070d4
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 0x407088
lea ecx, [ebp - 0x2117]
mov edx, dword [ebp - 0x212c]
mov eax, dword [ebp - 0x2130]
xor ebx, ebx
call dbg.send_shellcommand
jmp 0x405fc3
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x406ecf
push edx
push esi
push str._data
push eax
call dbg.do_sync_sync
add esp, 0x10
mov ebx, eax
jmp 0x406ecf
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 0x406faf
cld
mov edi, 0x41d0c9
mov ecx, 4
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4071b1
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 0x405fc3
mov eax, dword [ebp + 0xc]
mov esi, 1
mov ebx, dword [eax + 8]
jmp 0x406e8e
xor ebx, ebx
xor esi, esi
jmp 0x406e8e
cld
mov edi, str.start_server
mov ecx, 0xd
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x4071dd
sub esp, 0xc
push 0x41d0da
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
jmp 0x405fc3
cld
mov edi, str.jdwp
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x407231
sub esp, 0xc
push str.jdwp
call dbg.adb_connect
add esp, 0x10
mov ebx, eax
test eax, eax
jns 0x4064b1
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 0x405fc3
cld
mov edi, str.help
mov ecx, 5
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
je 0x40725a
mov edi, 0x41d0f6
mov ecx, 3
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x407266
call dbg.help
xor ebx, ebx
jmp 0x405fc3
cld
mov edi, str.version
mov ecx, 8
mov esi, dword [ebp - 0x2120]
repe cmpsb byte [esi], byte es:[edi]
jne 0x407296
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 0x405fc3
call dbg.usage
mov ebx, 1
jmp 0x405fc3