Function at 0x487190
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x55a150
mov eax, dword fs:[0]
push eax
sub esp, 0x15c
mov eax, dword [0x5ec3c8]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [edi + 0x4c]
test eax, eax
je 0x48735e
cmp eax, 0xffffffff
je 0x48735e
mov eax, dword [edi + 0x80]
mov dword [ebp - 0x14], 0
test eax, eax
je 0x4871ec
push eax
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov esi, dword [edi + 0x54]
mov ecx, esi
mov edx, dword [edi + 0x50]
sub ecx, edx
cmp ecx, 0x2000
jbe 0x487209
lea eax, [edx + 0x2000]
mov dword [edi + 0x54], eax
jmp 0x487244
jae 0x487244
mov eax, dword [edi + 0x58]
sub eax, edx
cmp eax, 0x2000
jae 0x48722a
lea eax, [ebp - 0x15]
push eax
push 0x2000
lea ecx, [edi + 0x50]
call fcn.00421730
jmp 0x487244
mov eax, 0x2000
sub eax, ecx
push eax
push 0
push dword [edi + 0x54]
add esi, eax
call fcn.0050cdd0
add esp, 0xc
mov dword [edi + 0x54], esi
mov edx, dword [edi + 0x50]
lea eax, [edi + 0x70]
mov ecx, dword [edi + 0x54]
push eax
lea eax, [ebp - 0x14]
sub ecx, edx
push eax
push ecx
push edx
push dword [edi + 0x4c]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x48726a
mov al, 1
jmp 0x487420
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, eax
cmp ecx, 0x3e5
mov dword [ebp - 0x24], ecx
sete bl
je 0x487357
cmp ecx, 0x6d
je 0x487324
sub esp, 8
mov eax, esp
push ecx
push 0x178
mov ecx, edi
mov dword [eax], str.base_rd_strt
mov dword [eax + 4], 0xc
call fcn.0047a4e0
call fcn.0044f060
push 1
lea ecx, [ebp - 0xc8]
push ecx
mov ecx, eax
call fcn.0044f5c0
lea edx, [ebp - 0x20]
mov dword [ebp - 0x20], str.PipeConnectionBase.cpp
lea ecx, [ebp - 0xc8]
mov dword [ebp - 0x1c], 0x179
call fcn.0041a580
mov edx, str.ReadFile_failed._System_error
lea ecx, [ebp - 0xc8]
call fcn.0041a5e0
lea edx, [ebp - 0x24]
lea ecx, [ebp - 0xc8]
call fcn.004301e0
lea ecx, [ebp - 0x70]
call fcn.0044dd10
lea eax, [ebp - 0x70]
mov dword [ebp - 4], 1
push eax
mov dword [ebp - 0x70], vtable.std::ios_base.0
call fcn.004f317c
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea esi, [edi + 0x1c]
push esi
call fcn.004f3843
add esp, 4
test eax, eax
jne 0x48743c
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x487343
mov dword [edi + 8], eax
mov ecx, dword [edi + 0x10]
cmp ecx, dword [edi + 0x14]
je 0x48734e
mov dword [edi + 0x14], ecx
push esi
call fcn.004f3868
add esp, 4
mov al, bl
jmp 0x487420
sub esp, 8
mov eax, esp
push 0
push 0x159
mov dword [eax], 0x5d458c
mov dword [eax + 4], 0xe
call fcn.0047a4e0
call fcn.0044f060
push 1
lea ecx, [ebp - 0x168]
push ecx
mov ecx, eax
call fcn.0044f5c0
lea edx, [ebp - 0x20]
mov dword [ebp - 0x20], str.PipeConnectionBase.cpp
lea ecx, [ebp - 0x168]
mov dword [ebp - 0x1c], 0x15a
call fcn.0041a580
mov edx, str.Pipe_handle_is_invalid
lea ecx, [ebp - 0x168]
call fcn.0041a5e0
lea ecx, [ebp - 0x110]
call fcn.0044dd10
lea eax, [ebp - 0x110]
mov dword [ebp - 4], 0
push eax
mov dword [ebp - method.std::ios_base.virtual_0], vtable.std::ios_base.0
call fcn.004f317c
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea esi, [edi + 0x1c]
push esi
call fcn.004f3843
add esp, 4
test eax, eax
jne 0x487442
mov eax, dword [edi + 4]
cmp eax, dword [edi + 8]
je 0x48740a
mov dword [edi + 8], eax
mov eax, dword [edi + 0x10]
cmp eax, dword [edi + 0x14]
je 0x487415
mov dword [edi + 0x14], eax
push esi
call fcn.004f3868
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0050a47b
mov esp, ebp
pop ebp
ret
push eax
call fcn.004f3949
push eax
call fcn.004f3949
int3