Function at 0x404a20
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411ac0
mov eax, dword fs:[0]
push eax
sub esp, 0x64
mov eax, dword [0x418014]
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 0x404c02
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 0x404bdd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x404bb0
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x404b3c
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x404b3c
push 0
push 0
push 0
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x404b28
cmp eax, 0xffffffff
je 0x404bdd
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 0x404ae2
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 0
je 0x404b5f
sub eax, 1
je 0x404c31
jmp 0x404aa0
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 0x404bdd
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x404c31
push 0
push 0xffffffffffffffff
push str.unexpected_error
lea ecx, [ebp - 0x34]
call fcn.0040e628
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x70]
call fcn.00404600
push 0x416248
jmp 0x404c3e
cmp eax, 0x6d
je 0x404c31
push 0
push 0xffffffffffffffff
push str.Read_Error
lea ecx, [ebp - 0x34]
call fcn.0040e628
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x70]
call fcn.00404600
push 0x416248
jmp 0x404c3e
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.004102b0
mov esp, ebp
pop ebp
ret 8
push 0
push 0xffffffffffffffff
push str.Failed_to_create_connection
lea ecx, [ebp - 0x34]
call fcn.0040e628
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x70]
call fcn.00404600
push 0x416248
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
lea ecx, [ebp - 0x70]
call fcn.00404690
push 0x416210
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3