Function at 0x403740
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x4c
mov edi, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
test edi, edi
je 0x4037b5
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 0x403b3c
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 0x403b1c
mov dword [esp + 4], 1
lea ebx, [ebp - 0x28]
mov dword [esp], 0x4035f0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
sub esp, 8
call fcn.00423e30
call fcn.004321f0
mov dword [esp], 0x15b3
call fcn.00426c20
mov dword [ebp - 0x28], 0x52bf9c
call fcn.00510cb0
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], edx
jmp 0x40384a
call fcn.00510cb0
sub eax, dword [ebp - 0x38]
sbb edx, dword [ebp - 0x34]
mov dword [ebp - 0x30], eax
mov dword [ebp - 0x2c], edx
fild qword [ebp - 0x30]
fld dword [0x52da84]
fxch st(1)
fucompi st(1)
fstp st(0)
ja 0x403aeb
mov dword [esp + 8], 0x5f5e100
mov dword [esp + 0xc], 0
mov dword [esp], 0
mov dword [esp + 4], 0
call fcn.004f3b70
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0x52d96d
mov dword [esp], esi
call fcn.0041abe0
test eax, eax
jne 0x403800
test edi, edi
jne 0x403950
call fcn.00429a50
test byte [0x56103c], 1
jne 0x4038b1
call fcn.0041cbc0
mov eax, dword [ebp - 0x28]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
jne 0x403b5c
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.00435450
cmp eax, 2
jg 0x403890
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.00435b60
mov ecx, ebx
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0xba
mov dword [esp], str.system_core_adb_client_main.cpp
call fcn.00434b70
mov ecx, ebx
sub esp, 0x14
call fcn.00434cf0
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.0051a330
mov ecx, ebx
call fcn.00434d50
mov eax, dword [ebp - 0x1c]
mov dword [esp], ebx
lea ecx, [eax - 0xc]
call fcn.004ede60
sub esp, 4
call esi
mov dword [eax], edi
jmp 0x403890
lea ebx, [ebp - 0x24]
call fcn.0041b790
mov eax, ebx
call fcn.00403600
mov eax, dword [ebp - 0x24]
mov dword [esp + 8], 0x1a0
mov dword [esp + 4], 0x109
mov dword [esp], eax
call fcn.0042fca0
cmp eax, 0xffffffff
mov esi, eax
je 0x403b81
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x403bf9
mov dword [esp + 4], 2
mov dword [esp], esi
call sub.msvcrt.dll__dup2
cmp eax, 0xffffffff
je 0x403c19
mov dword [esp], esi
lea esi, [ebp - 0x1c]
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.00431480
call fcn.00435450
cmp eax, 2
jle 0x403a61
mov eax, dword [ebp - 0x24]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
jne 0x403ba8
call fcn.00429a50
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 0x403bca
mov eax, dword [ebp - 0x24]
cmp eax, 3
jne 0x403c39
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 4
jmp 0x403887
mov edi, dword [sym.imp.msvcrt.dll__errno]
lea esi, [ebp - 0x1c]
call edi
mov eax, dword [eax]
mov dword [esp], esi
mov dword [ebp - 0x38], eax
call fcn.00416610
lea ecx, [ebp - 0x20]
mov dword [esp + 0x10], 0xffffffff
mov dword [esp + 0xc], 2
mov dword [esp + 8], 0
mov dword [esp + 4], 0x53
mov dword [esp], str.system_core_adb_client_main.cpp
call fcn.00434b70
lea ecx, [ebp - 0x20]
sub esp, 0x14
call fcn.00434cf0
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.0051a330
lea ecx, [ebp - 0x20]
call fcn.00434d50
mov eax, dword [ebp - 0x1c]
lea ecx, [eax - 0xc]
cmp ecx, 0x52bf90
jne 0x403afe
call edi
mov edx, dword [ebp - 0x38]
mov dword [eax], edx
jmp 0x4039ed
mov eax, dword [ebp - 0x28]
mov dword [esp], str.could_not_install_smartsocket_listener:__s
mov dword [esp + 4], eax
call fcn.00416650
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x403adf
lea eax, [ebp - 0x20]
mov dword [esp], eax
call fcn.004ede40
sub esp, 4
jmp 0x403adf
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp], str.cannot_make_stderr_unbuffered:__s
mov dword [esp + 4], eax
call fcn.00416650
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp], str.cannot_make_stdout_unbuffered:__s
mov dword [esp + 4], eax
call fcn.00416650
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4038a7
lea eax, [ebp - 0x1c]
mov dword [esp], eax
call fcn.004ede40
sub esp, 4
jmp 0x4038a7
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp], 0x52d97b
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 4], eax
call fcn.00416650
mov edx, 0xffffffff
lock xadd dword [eax - 4], edx
test edx, edx
jg 0x4039ff
mov dword [esp], esi
call fcn.004ede40
sub esp, 4
jmp 0x4039ff
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea edx, [ebp - 0x20]
mov dword [esp], edx
mov dword [esp + 4], eax
call fcn.00435f00
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.00416650
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp], str.cannot_redirect_stdout:__s
mov dword [esp + 4], eax
call fcn.00416650
call dword [sym.imp.msvcrt.dll__errno]
mov eax, dword [eax]
mov dword [esp], eax
call fcn.004319b0
mov dword [esp], str.cannot_redirect_stderr:__s
mov dword [esp + 4], eax
call fcn.00416650
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.00416650
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop