Function at 0x405860
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
mov esi, edx
push ebx
sub esp, 0x7c
lea ecx, [ebp - 0x30]
call fcn.004044e0
lea eax, [ebp - 0x50]
mov dword [esp + 4], eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
mov dword [ebp - 0x50], 0x51ef3c
call fcn.00402880
test al, al
je 0x405b10
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [str.shell_v2]
lea ecx, [ebp - 0x3c]
mov dword [esp], eax
call fcn.004e3a40
lea eax, [ebp - 0x3c]
sub esp, 8
mov dword [esp + 4], eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0041fec0
mov byte [ebp - 0x69], al
mov eax, dword [ebp - 0x3c]
lea ebx, [eax - 0xc]
cmp ebx, 0x51ef30
jne 0x4060c7
cmp byte [ebp - 0x69], 0
je 0x405a38
test byte [0x55503c], 1
jne 0x4060ec
mov edx, edi
sub edx, 1
lea ebx, [esi + 4]
mov byte [ebp - 0x60], 0x7e
mov dword [ebp - 0x68], 0
je 0x405b82
mov dword [ebp - 0x5c], edx
mov edx, ebx
jmp 0x40595b
cmp dword [ebp - 0x5c], 1
jle 0x405b63
mov esi, dword [edx + 4]
mov edi, str.none
mov dword [ebp - 0x60], edx
mov dword [esp], esi
mov dword [ebp - 0x64], esi
call sub.msvcrt.dll_strlen
mov ecx, 5
mov edx, dword [ebp - 0x60]
cmp eax, 1
je 0x405ac1
repe cmpsb byte [esi], byte es:[edi]
jne 0x405b63
mov byte [ebp - 0x60], 0
sub dword [ebp - 0x5c], 2
add edx, 8
mov edi, dword [ebp - 0x5c]
test edi, edi
je 0x4059c7
mov eax, dword [edx]
mov ecx, 3
mov edi, 0x523f1b
mov esi, eax
repe cmpsb byte [esi], byte es:[edi]
seta cl
mov esi, ecx
setb cl
mov ebx, esi
cmp bl, cl
je 0x405910
mov edi, 0x523f5e
mov esi, eax
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x405aa0
mov edi, 0x523f61
mov esi, eax
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
je 0x405aa0
mov edi, 0x523f64
mov esi, eax
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
jne 0x405ae0
sub dword [ebp - 0x5c], 1
add edx, 4
mov edi, dword [ebp - 0x5c]
mov byte [ebp - 0x69], 0
test edi, edi
jne 0x40595b
mov esi, dword [ebp - 0x68]
mov ebx, edx
mov edx, dword [ebp - 0x5c]
test esi, esi
je 0x405b82
cmp byte [ebp - 0x69], 1
je 0x405b82
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [str.shell_v2]
lea ecx, [ebp - 0x3c]
mov dword [esp], eax
call fcn.004e3a40
lea eax, [ebp - 0x3c]
sub esp, 8
mov dword [esp + 4], eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0041fec0
mov edx, dword [ebp - 0x3c]
lea ebx, [edx - 0xc]
cmp ebx, 0x51ef30
mov esi, eax
jne 0x4060a2
mov eax, esi
test al, al
jne 0x405dc0
mov dword [esp + 4], str.error:_target_doesnt_support_PTY_args__Tt_n
jmp 0x405b6b
test byte [0x55503c], 1
je 0x4058ee
call fcn.0042d960
cmp eax, 2
jg 0x4058ee
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
lea ecx, [ebp - 0x3c]
mov eax, dword [eax]
mov dword [esp + 4], str.shell_protocol_not_supported__using_raw_data_transfer
mov dword [esp], ecx
mov dword [ebp - 0x5c], eax
call fcn.0042e9a0
lea eax, [ebp - 0x40]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x2d4
jmp 0x40613d
mov ecx, dword [ebp - 0x68]
add ecx, 1
cmp byte [eax + 1], 0x74
mov eax, 0xffffffff
cmovne ecx, eax
add edx, 4
mov dword [ebp - 0x68], ecx
sub dword [ebp - 0x5c], 1
jmp 0x405954
mov esi, dword [ebp - 0x64]
repe cmpsb byte [esi], byte es:[edi]
je 0x405949
mov esi, dword [ebp - 0x64]
movzx eax, byte [esi]
mov byte [ebp - 0x60], al
jmp 0x40594d
mov edi, 0x523f67
mov esi, eax
mov ecx, 3
repe cmpsb byte [esi], byte es:[edi]
jne 0x4059c7
mov dword [ebp - 0x64], edx
call fcn.00416a30
mov edx, dword [ebp - 0x64]
sub dword [ebp - 0x5c], 1
add edx, 4
jmp 0x405954
mov eax, dword [ebp - 0x50]
mov ebx, 1
mov dword [esp + 4], str.error:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
mov eax, dword [ebp - 0x50]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
jne 0x406197
lea ecx, [ebp - 0x30]
call fcn.004e43a0
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call fcn.00513970
lea esp, [ebp - 0xc]
mov eax, ebx
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 4], str.error:__e_requires_a_single_character_argument_or_none_n
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov ebx, 1
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
jmp 0x405b34
lea eax, [ebp - 0x44]
mov dword [esp + 4], eax
mov eax, dword [str.shell_v2]
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x4c], 0x51ef3c
mov dword [esp], eax
call fcn.004e3a40
lea eax, [ebp - 0x3c]
sub esp, 8
mov dword [esp + 4], eax
lea eax, [ebp - 0x30]
mov dword [esp], eax
call fcn.0041fec0
mov edx, dword [ebp - 0x5c]
mov esi, eax
mov eax, dword [ebp - 0x3c]
lea ecx, [eax - 0xc]
cmp ecx, 0x51ef30
jne 0x405fd6
mov eax, esi
test al, al
je 0x405c10
mov ecx, dword [ebp - 0x68]
test ecx, ecx
js 0x405fce
je 0x405fb4
cmp dword [ebp - 0x68], 1
je 0x405ee7
mov dword [esp + 4], 3
lea ecx, [ebp - 0x4c]
mov dword [esp], 0x524ed1
mov dword [ebp - 0x5c], edx
call fcn.004e2b90
mov edx, dword [ebp - 0x5c]
sub esp, 8
lea eax, [ebp - 0x40]
test edx, edx
mov dword [ebp - 0x48], 0x51ef3c
lea esi, [ebp - 0x48]
mov dword [ebp - 0x64], eax
jne 0x405dcd
movzx eax, byte [ebp - 0x69]
lea ecx, [ebp - 0x4c]
mov dword [esp], esi
mov edx, eax
mov dword [ebp - 0x68], eax
lea eax, [ebp - 0x44]
call fcn.00405570
lea ecx, [ebp - 0x4c]
mov dword [esp], 0x524ed1
call fcn.004ba230
mov byte [ebp - 0x5c], 1
sub esp, 4
test eax, eax
je 0x405c6b
mov eax, dword [ebp - 0x4c]
mov byte [ebp - 0x5c], 0
mov edx, dword [eax - 0xc]
test edx, edx
je 0x405e9b
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x40], 0x51ef3c
mov dword [esp + 4], eax
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.00401fc0
test eax, eax
mov edi, eax
js 0x405f8b
mov dword [esp], 0x14
call fcn.00513a20
cmp byte [ebp - 0x69], 0
mov esi, eax
mov dword [eax + 0xc], 0
mov dword [eax], 0
mov dword [eax + 4], edi
movzx eax, byte [ebp - 0x5c]
mov byte [esi + 8], al
movzx eax, byte [ebp - 0x60]
mov byte [esi + 0x10], al
jne 0x405f55
cmp byte [ebp - 0x5c], 0
jne 0x405f45
mov dword [esp], 8
call fcn.00513a20
mov dword [eax], 0x404cc0
mov dword [eax + 4], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x404470
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
je 0x405e65
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x68]
sub esp, 4
mov dword [esp + 8], 0x555028
mov dword [esp + 4], eax
mov dword [esp], edi
call fcn.004050e0
cmp byte [ebp - 0x5c], 0
mov ebx, eax
jne 0x405f3b
mov eax, dword [ebp - 0x40]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
jne 0x40604f
mov eax, dword [ebp - 0x44]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
jne 0x40602a
mov eax, dword [ebp - 0x48]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
jne 0x406005
mov eax, dword [ebp - 0x4c]
lea esi, [eax - 0xc]
cmp esi, 0x51ef30
je 0x405b34
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x405b34
lea eax, [ebp - 0x3c]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405b34
mov dword [esp + 4], str.error:_PTY_args__Tt_cannot_be_used_with__x_n
jmp 0x405b6b
lea esi, [edx*4]
xor eax, eax
sar esi, 2
xor edx, edx
test esi, esi
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
jne 0x405ec1
lea edi, [eax + edx]
test esi, esi
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x34], edi
jne 0x405eac
lea eax, [ebp - 0x40]
lea edx, [ebp - 0x3c]
mov dword [esp], eax
lea esi, [ebp - 0x48]
mov dword [ebp - 0x38], edi
mov edi, eax
mov dword [esp + 8], 0x20
mov dword [esp + 4], edx
mov dword [ebp - 0x64], eax
call fcn.004b55d0
mov ecx, esi
mov dword [esp], edi
call fcn.004e25a0
mov eax, dword [ebp - 0x40]
lea ecx, [eax - 0xc]
sub esp, 4
cmp ecx, 0x51ef30
jne 0x406074
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x405c28
mov dword [esp], eax
call fcn.00513970
jmp 0x405c28
call fcn.0042d960
cmp eax, 4
lea esi, [esi]
jle 0x4061bc
mov ecx, dword [esi + 0xc]
test ecx, ecx
je 0x405e82
mov eax, dword [ecx]
call dword [eax + 4]
mov dword [esi + 0xc], 0
mov dword [esp], esi
call fcn.00513970
mov eax, 1
jmp 0x405d43
mov eax, dword [ebp - 0x48]
mov eax, dword [eax - 0xc]
test eax, eax
sete byte [ebp - 0x5c]
jmp 0x405c6b
mov dword [esp + 8], edx
mov dword [esp + 4], ebx
mov dword [esp], eax
call sub.msvcrt.dll_memmove
jmp 0x405e09
cmp esi, 0x3fffffff
ja 0x40609d
lea edx, [esi*4]
mov dword [esp], edx
mov dword [ebp - 0x5c], edx
call fcn.00513a20
mov edx, dword [ebp - 0x5c]
jmp 0x405df8
mov dword [esp], 0
mov dword [ebp - 0x5c], edx
call fcn.00428810
mov edx, dword [ebp - 0x5c]
test eax, eax
jne 0x405bf0
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 4], str.Remote_PTY_will_not_be_allocated_because_stdin_is_not_a_terminal._nUse_multiple__t_options_to_force_remote_PTY_allocation._n
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
mov dword [esp + 4], 3
lea ecx, [ebp - 0x4c]
mov dword [esp], 0x524ed5
call fcn.004e2b90
mov edx, dword [ebp - 0x5c]
sub esp, 8
jmp 0x405c10
call fcn.00428990
jmp 0x405d4f
call fcn.00428870
lea esi, [esi]
jmp 0x405cce
mov dword [esp], 0x40014
call fcn.00513a20
mov ebx, eax
mov eax, dword [esi + 4]
mov ecx, ebx
mov dword [esp], eax
call fcn.00410fc0
mov ecx, dword [esi + 0xc]
mov dword [esi + 0xc], ebx
sub esp, 4
test ecx, ecx
je 0x405cc4
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x405cc4
mov eax, dword [ebp - 0x40]
mov ebx, 1
mov dword [esp + 4], str.error:__s_n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.0042a420
jmp 0x405d4f
mov dword [esp], 0
mov dword [ebp - 0x5c], edx
call fcn.00428810
mov edx, dword [ebp - 0x5c]
test eax, eax
jne 0x405c10
mov dword [ebp - 0x5c], edx
jmp 0x405f19
sub eax, 4
mov dword [ebp - 0x64], ecx
call fcn.00515579
mov edx, dword [ebp - 0x5c]
mov ecx, dword [ebp - 0x64]
test eax, eax
jg 0x405bcf
lea eax, [ebp - 0x40]
mov dword [esp], eax
call fcn.004e2310
mov edx, dword [ebp - 0x5c]
sub esp, 4
jmp 0x405bcf
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x405d85
lea eax, [ebp - 0x3c]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405d85
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x405d73
lea eax, [ebp - 0x3c]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405d73
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x405d61
lea eax, [ebp - 0x3c]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405d61
sub eax, 4
mov dword [ebp - 0x5c], ecx
call fcn.00515579
mov ecx, dword [ebp - 0x5c]
test eax, eax
jg 0x405e4d
lea eax, [ebp - 0x44]
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405e4d
call fcn.0050e0f0
lea eax, [edx - 4]
call fcn.00515579
test eax, eax
jg 0x405a21
lea eax, [ebp - 0x40]
mov ecx, ebx
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405a21
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x4058d7
lea eax, [ebp - 0x40]
mov ecx, ebx
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x4058d7
call fcn.0042d960
cmp eax, 2
jg 0x4058ee
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
lea ecx, [ebp - 0x3c]
mov eax, dword [eax]
mov dword [esp + 4], str.using_shell_protocol
mov dword [esp], ecx
mov dword [ebp - 0x5c], eax
call fcn.0042e9a0
lea eax, [ebp - 0x40]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x2d6
mov ecx, eax
mov dword [esp], str.system_core_adb_commandline.cpp
mov dword [ebp - 0x64], eax
call fcn.0042da30
mov ecx, dword [ebp - 0x64]
sub esp, 0x14
call fcn.0042dbb0
mov edx, dword [ebp - 0x3c]
mov ecx, dword [edx - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.0050d650
mov ecx, dword [ebp - 0x64]
call fcn.0042dc40
mov eax, dword [ebp - 0x64]
mov ecx, dword [ebp - 0x3c]
mov dword [esp], eax
sub ecx, 0xc
call fcn.004e2330
sub esp, 4
call ebx
mov edx, dword [ebp - 0x5c]
mov dword [eax], edx
jmp 0x4058ee
sub eax, 4
call fcn.00515579
test eax, eax
jg 0x405b46
lea eax, [ebp - 0x3c]
mov ecx, esi
mov dword [esp], eax
call fcn.004e2310
sub esp, 4
jmp 0x405b46
mov ebx, dword [sym.imp.msvcrt.dll__errno]
call ebx
mov edi, dword [eax]
call ebx
lea ecx, [ebp - 0x3c]
mov eax, dword [eax]
mov dword [esp + 0xc], 4
mov dword [esp + 8], 0
mov dword [esp + 4], 0x2ba
mov dword [esp + 0x10], eax
mov dword [esp], str.system_core_adb_commandline.cpp
call fcn.0042da30
lea ecx, [ebp - 0x3c]
sub esp, 0x14
call fcn.0042dbb0
mov dword [esp + 4], str.error_starting_stdin_read_thread
mov dword [esp], eax
call fcn.00511360
lea ecx, [ebp - 0x3c]
call fcn.0042dc40
call ebx
mov dword [eax], edi
jmp 0x405e76