Function at 0x402b50
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov eax, dword [ebp + 8]
test eax, eax
jne 0x402c26
mov dword [esp + 4], 1
lea ebx, [ebp - 0x28]
mov dword [esp], 0x402a00
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push edx
push edx
call fcn.0041c450
call fcn.004296d0
mov dword [esp], 0x15b3
call fcn.0041eb30
call fcn.00421600
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.tcp:_d
mov dword [esp], ebx
mov dword [ebp - 0x2c], 0x51af3c
mov dword [esp + 8], eax
call fcn.0042cf00
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x51c5dc
mov dword [esp], ebx
call fcn.00414660
test eax, eax
jne 0x40309c
test byte [0x551030], 1
jne 0x402e80
call fcn.00416050
mov eax, dword [ebp - 0x28]
lea ebx, [eax - 0xc]
cmp ebx, 0x51af30
jne 0x402e5d
mov eax, dword [ebp - 0x2c]
lea ebx, [eax - 0xc]
cmp ebx, 0x51af30
jne 0x402e3a
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
add eax, 0x20
mov dword [esp], eax
call sub.msvcrt.dll_setvbuf
cmp eax, 0xffffffff
je 0x402e1a
mov eax, dword [sym.imp.msvcrt.dll__iob]
mov dword [esp + 0xc], 0
mov dword [esp + 8], 4
mov dword [esp + 4], 0
add eax, 0x40
mov dword [esp], eax
call sub.msvcrt.dll_setvbuf
cmp eax, 0xffffffff
je 0x402f1b
mov dword [esp + 4], 1
lea ebx, [ebp - 0x28]
mov dword [esp], 0x402a00
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push eax
push eax
call fcn.0041c450
call fcn.004296d0
mov dword [esp], 0x15b3
call fcn.0041eb30
call fcn.00421600
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.tcp:_d
mov dword [esp], ebx
mov dword [ebp - 0x2c], 0x51af3c
mov dword [esp + 8], eax
call fcn.0042cf00
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x51c5dc
mov dword [esp], ebx
call fcn.00414660
test eax, eax
jne 0x40309c
lea ebx, [ebp - 0x24]
call fcn.00415200
mov eax, ebx
call fcn.00402a10
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0x1a0
mov dword [esp + 4], 0x109
mov dword [esp], eax
call fcn.00427240
cmp eax, 0xffffffff
mov esi, eax
je 0x402f40
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x402f67
mov dword [esp + 4], 2
mov dword [esp], esi
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x402f87
mov dword [esp], esi
call sub.msvcrt.dll__close
call sub.msvcrt.dll__getpid
mov dword [esp + 4], str.____adb_starting__pid__d______n
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__iob]
add eax, 0x40
mov dword [esp], eax
call fcn.00428b20
call fcn.0042bec0
cmp eax, 2
jle 0x402fa7
lea esi, [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
lea edi, [eax - 0xc]
cmp edi, 0x51af30
jne 0x403035
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x1c], 0xa4b4f
mov dword [ebp - 0x24], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], 3
mov dword [esp + 4], esi
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x403055
mov eax, dword [ebp - 0x24]
cmp eax, 3
jne 0x403084
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x402be6
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00423fd0
mov dword [esp], str.cannot_make_stdout_unbuffered:__s
mov dword [esp + 4], eax
call fcn.00410010
sub eax, 4
call fcn.00511ff0
test eax, eax
jg 0x402c1c
lea eax, [ebp - 0x1c]
mov ecx, ebx
mov dword [esp], eax
call fcn.004df650
push ecx
jmp 0x402c1c
sub eax, 4
call fcn.00511ff0
test eax, eax
jg 0x402c0a
lea eax, [ebp - 0x1c]
mov ecx, ebx
mov dword [esp], eax
call fcn.004df650
push ebx
jmp 0x402c0a
call fcn.0042bec0
cmp eax, 2
jg 0x402bf3
mov esi, dword [sym.imp.msvcrt.dll__errno]
lea ebx, [ebp - 0x20]
call esi
mov edi, dword [eax]
lea eax, [ebp - 0x1c]
mov dword [esp], eax
mov dword [esp + 4], str.Event_loop_starting
call fcn.0042cf00
mov ecx, ebx
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0xa5
mov dword [esp], str.system_core_adb_client_main.cpp
call fcn.0042bf90
mov ecx, ebx
sub esp, 0x14
call fcn.0042c110
mov edx, dword [ebp - 0x1c]
mov ecx, dword [edx - 0xc]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call fcn.0050a5a0
mov ecx, ebx
call fcn.0042c1a0
mov eax, dword [ebp - 0x1c]
mov dword [esp], ebx
lea ecx, [eax - 0xc]
call fcn.004df670
push eax
call esi
mov dword [eax], edi
jmp 0x402bf3
nop
lea esi, [esi]
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00423fd0
mov dword [esp], str.cannot_make_stderr_unbuffered:__s
mov dword [esp + 4], eax
call fcn.00410010
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00423fd0
mov dword [esp], 0x51c4d1
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
call fcn.00410010
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00423fd0
mov dword [esp], str.cannot_redirect_stdout:__s
mov dword [esp + 4], eax
call fcn.00410010
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00423fd0
mov dword [esp], str.cannot_redirect_stderr:__s
mov dword [esp + 4], eax
call fcn.00410010
mov edx, dword [sym.imp.msvcrt.dll__errno]
lea esi, [ebp - 0x1c]
mov dword [ebp - 0x3c], edx
call edx
mov edi, dword [eax]
mov dword [esp], esi
call fcn.0040ffd0
lea ecx, [ebp - 0x20]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x5a
mov dword [esp], str.system_core_adb_client_main.cpp
call fcn.0042bf90
lea ecx, [ebp - 0x20]
sub esp, 0x14
call fcn.0042c110
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ecx - 0xc]
mov dword [esp + 4], ecx
mov dword [esp], eax
mov dword [esp + 8], edx
call fcn.0050a5a0
lea ecx, [ebp - 0x20]
call fcn.0042c1a0
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
lea ecx, [eax - 0xc]
cmp ecx, 0x51af30
jne 0x4030af
call edx
mov dword [eax], edi
jmp 0x402dab
sub eax, 4
call fcn.00511ff0
test eax, eax
jg 0x402dbd
mov dword [esp], esi
mov ecx, edi
call fcn.004df650
push eax
jmp 0x402dbd
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x20]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0042d220
mov eax, dword [ebp - 0x20]
mov dword [esp], str.adb:_cannot_write_ACK_to_handle_0x_p:__s
mov dword [esp + 8], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
call fcn.00410010
mov dword [esp + 8], eax
mov dword [esp + 4], 3
mov dword [esp], str.adb:_cannot_write__lu_bytes_of_ACK:_only_wrote__lu_bytes
call fcn.00410010
mov eax, dword [ebp - 0x2c]
mov dword [esp], str.could_not_install_smartsocket_listener:__s
mov dword [esp + 4], eax
call fcn.00410010
sub eax, 4
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
call fcn.00511ff0
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
test eax, eax
jg 0x40302c
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x3c], edx
call fcn.004df650
mov edx, dword [ebp - 0x3c]
push eax
jmp 0x40302c