Function at 0x405480
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x412985
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x419040]
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 [ebp + 8]
xorps xmm0, xmm0
push 0
push 0
push 1
push 0
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x1c], 0
movlpd qword [ebp - 0x50], xmm0
movlpd qword [ebp - 0x48], xmm0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
mov esi, eax
mov dword [ebp - 0x3c], esi
mov dword [ebp - 4], 0
mov eax, dword [edi + 8]
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x18], esi
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x14], eax
cmp esi, 0xffffffff
je 0x405662
mov ebx, dword [ebp + 0xc]
nop dword [eax]
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0x1c]
push eax
push ebx
push dword [ebp - 0x54]
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40563d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x405610
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x40559c
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x40559c
push 0
push 0
push 0
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x405588
cmp eax, 0xffffffff
je 0x40563d
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageA]
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
jne 0x405542
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 0
je 0x4055bf
sub eax, 1
je 0x405691
jmp 0x405500
push 1
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp - 0x50]
push eax
push dword [edi + 4]
call dword [sym.imp.KERNEL32.dll_GetOverlappedResult]
test eax, eax
jne 0x40563d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x405691
push 0
push 0xffffffffffffffff
push str.unexpected_error
lea ecx, [ebp - 0x34]
call fcn.0040f761
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x70]
call fcn.00405040
push 0x4171f0
jmp 0x40569e
cmp eax, 0x6d
je 0x405691
push 0
push 0xffffffffffffffff
push str.Read_Error
lea ecx, [ebp - 0x34]
call fcn.0040f761
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x70]
call fcn.00405040
push 0x4171f0
jmp 0x40569e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
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.00411240
mov esp, ebp
pop ebp
ret 8
push 0
push 0xffffffffffffffff
push str.Failed_to_create_connection
lea ecx, [ebp - 0x34]
call fcn.0040f761
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x70]
call fcn.00405040
push 0x4171f0
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
lea ecx, [ebp - 0x70]
call fcn.004050d0
push 0x4171b8
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3