Function at 0x4029b2
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [ebp + 8]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0xc]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x10]
test eax, eax
je 0x402b10
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 0
mov eax, dword [ebp + 8]
lea edx, [eax + 0x14]
mov dword [esp + 0xc], 0
lea eax, [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], edx
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
call eax
sub esp, 0x10
test eax, eax
jne 0x402a62
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0xea
jne 0x402a3e
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], str.GetOverlappedResult:_ERROR_MORE_DATA__len_d_
mov dword [esp], 0
call dbg.info
jmp 0x402a62
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov dword [esp], str.GetOverlappedResult
call dbg.syserror
jmp 0x402ca1
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x402a8d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov dword [esp], str.fd_closed
call dbg.error
jmp 0x402ca1
mov eax, dword [ebp - 0x18]
cmp dword [ebp - 0xc], eax
jne 0x402ab1
shl dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0x4000
jbe 0x402aa8
mov dword [ebp - 0xc], 0x4000
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x72
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.print_xfer
mov eax, dword [ebp - 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.iobuf_commit
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [ebp + 0x14]
call eax
test eax, eax
jns 0x402b10
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x402ca1
lea eax, [ebp - 0x20]
mov dword [esp + 8], eax
mov eax, dword [ebp - 0xc]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.iobuf_reserve
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x402b5d
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov eax, dword [ebp + 0x10]
mov dword [esp + 4], eax
mov dword [esp], str.failed_to_allocate__s_buffer
call dbg.error
jmp 0x402ca1
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp + 8]
lea edx, [eax + 0x14]
mov eax, dword [ebp - 0x20]
mov dword [esp + 0x10], edx
lea edx, [ebp - 0x1c]
mov dword [esp + 0xc], edx
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x14]
mov dword [esp + 4], eax
mov eax, dword [ebp + 0xc]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ReadFile]
call eax
sub esp, 0x14
test eax, eax
je 0x402c46
mov eax, dword [ebp - 0x1c]
test eax, eax
jne 0x402bc6
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov dword [esp], str.fd_closed
call dbg.error
jmp 0x402ca1
mov eax, dword [ebp - 0x1c]
cmp dword [ebp - 0xc], eax
jne 0x402bea
shl dword [ebp - 0xc], 1
cmp dword [ebp - 0xc], 0x4000
jbe 0x402be1
mov dword [ebp - 0xc], 0x4000
mov eax, dword [ebp + 8]
mov edx, dword [ebp - 0xc]
mov dword [eax + 0xc], edx
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x72
mov eax, dword [ebp + 0x10]
mov dword [esp], eax
call dbg.print_xfer
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
call dbg.iobuf_commit
mov eax, dword [ebp + 0x18]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x10]
mov dword [esp], eax
mov eax, dword [ebp + 0x14]
call eax
test eax, eax
jns 0x402c9c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov eax, 0xffffffff
jmp 0x402ca1
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
cmp eax, 0x6d
je 0x402c65
cmp eax, 0x3e5
jne 0x402c7b
mov eax, dword [ebp + 8]
mov dword [eax + 0x10], 1
jmp 0x402c9c
mov dword [esp + 4], str.child_process_has_closed_pipe
mov dword [esp], 0
call dbg.info
jmp 0x402c9c
mov eax, dword [ebp + 8]
mov eax, dword [eax + 0x24]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_ResetEvent]
call eax
sub esp, 4
mov dword [esp], str.failed_to_read
call dbg.syserror
jmp 0x402ca1
mov eax, 0
leave
ret