Function at 0x403670
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 0x403746
mov dword [esp + 4], 1
lea ebx, [ebp - 0x28]
mov dword [esp], 0x403520
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push edx
push edx
call fcn.0041ded0
call fcn.0042b170
mov dword [esp], 0x15b3
call fcn.004205d0
call fcn.00422fa0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.tcp:_d
mov dword [esp], ebx
mov dword [ebp - 0x2c], 0x51ef3c
mov dword [esp + 8], eax
call fcn.0042e9a0
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x520a78
mov dword [esp], ebx
call fcn.00415e90
test eax, eax
jne 0x403bbc
test byte [0x55503c], 1
jne 0x4039a0
call fcn.00417ab0
mov eax, dword [ebp - 0x28]
lea ebx, [eax - 0xc]
cmp ebx, 0x51ef30
jne 0x40397d
mov eax, dword [ebp - 0x2c]
lea ebx, [eax - 0xc]
cmp ebx, 0x51ef30
jne 0x40395a
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 0x40393a
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 0x403a3b
mov dword [esp + 4], 1
lea ebx, [ebp - 0x28]
mov dword [esp], 0x403520
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
push eax
push eax
call fcn.0041ded0
call fcn.0042b170
mov dword [esp], 0x15b3
call fcn.004205d0
call fcn.00422fa0
mov eax, dword [ebp + 0xc]
mov dword [esp + 4], str.tcp:_d
mov dword [esp], ebx
mov dword [ebp - 0x2c], 0x51ef3c
mov dword [esp + 8], eax
call fcn.0042e9a0
lea eax, [ebp - 0x2c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x520a78
mov dword [esp], ebx
call fcn.00415e90
test eax, eax
jne 0x403bbc
lea ebx, [ebp - 0x24]
call fcn.00416a30
mov eax, ebx
call fcn.00403530
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0x1a0
mov dword [esp + 4], 0x109
mov dword [esp], eax
call fcn.00428bd0
cmp eax, 0xffffffff
mov esi, eax
je 0x403a60
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x403a87
mov dword [esp + 4], 2
mov dword [esp], esi
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x403aa7
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.0042a420
call fcn.0042d960
cmp eax, 2
jle 0x403ac7
lea esi, [ebp - 0x1c]
mov eax, dword [ebp - 0x24]
lea edi, [eax - 0xc]
cmp edi, 0x51ef30
jne 0x403b55
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 0x403b75
mov eax, dword [ebp - 0x24]
cmp eax, 3
jne 0x403ba4
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x403706
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp], str.cannot_make_stdout_unbuffered:__s
mov dword [esp + 4], eax
call fcn.004117e0
sub eax, 4
call fcn.005150c0
test eax, eax
jg 0x40373c
lea eax, [ebp - 0x1c]
mov ecx, ebx
mov dword [esp], eax
call fcn.004e2310
push ecx
jmp 0x40373c
sub eax, 4
call fcn.005150c0
test eax, eax
jg 0x40372a
lea eax, [ebp - 0x1c]
mov ecx, ebx
mov dword [esp], eax
call fcn.004e2310
push ebx
jmp 0x40372a
call fcn.0042d960
cmp eax, 2
jg 0x403713
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.0042e9a0
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.0042da30
mov ecx, ebx
sub esp, 0x14
call fcn.0042dbb0
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.0050d650
mov ecx, ebx
call fcn.0042dc40
mov eax, dword [ebp - 0x1c]
mov dword [esp], ebx
lea ecx, [eax - 0xc]
call fcn.004e2330
push eax
call esi
mov dword [eax], edi
jmp 0x403713
nop
lea esi, [esi]
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp], str.cannot_make_stderr_unbuffered:__s
mov dword [esp + 4], eax
call fcn.004117e0
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp], 0x52096d
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
call fcn.004117e0
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp], str.cannot_redirect_stdout:__s
mov dword [esp + 4], eax
call fcn.004117e0
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.00425970
mov dword [esp], str.cannot_redirect_stderr:__s
mov dword [esp + 4], eax
call fcn.004117e0
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.004117a0
lea ecx, [ebp - 0x20]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x4f
mov dword [esp], str.system_core_adb_client_main.cpp
call fcn.0042da30
lea ecx, [ebp - 0x20]
sub esp, 0x14
call fcn.0042dbb0
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.0050d650
lea ecx, [ebp - 0x20]
call fcn.0042dc40
mov eax, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x3c]
lea ecx, [eax - 0xc]
cmp ecx, 0x51ef30
jne 0x403bcf
call edx
mov dword [eax], edi
jmp 0x4038cb
sub eax, 4
call fcn.005150c0
test eax, eax
jg 0x4038dd
mov dword [esp], esi
mov ecx, edi
call fcn.004e2310
push eax
jmp 0x4038dd
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x20]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.0042ecc0
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.004117e0
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.004117e0
mov eax, dword [ebp - 0x2c]
mov dword [esp], str.could_not_install_smartsocket_listener:__s
mov dword [esp + 4], eax
call fcn.004117e0
sub eax, 4
mov dword [ebp - 0x40], edx
mov dword [ebp - 0x3c], ecx
call fcn.005150c0
mov ecx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x40]
test eax, eax
jg 0x403b4c
lea eax, [ebp - 0x20]
mov dword [esp], eax
mov dword [ebp - 0x3c], edx
call fcn.004e2310
mov edx, dword [ebp - 0x3c]
push eax
jmp 0x403b4c