Function at 0x4049e0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x411a80
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 0x404bc2
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 0x404b9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x3e5
jne 0x404b70
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
test eax, eax
je 0x404afc
push 0
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
cmp eax, 1
je 0x404afc
push 0
push 0
push 0
lea eax, [ebp - 0x38]
push eax
call dword [sym.imp.USER32.dll_GetMessageA]
test eax, eax
je 0x404ae8
cmp eax, 0xffffffff
je 0x404b9d
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 0x404aa2
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x18]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
sub eax, 0
je 0x404b1f
sub eax, 1
je 0x404bf1
jmp 0x404a60
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 0x404b9d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x6d
je 0x404bf1
push 0
push 0xffffffffffffffff
push str.unexpected_error
lea ecx, [ebp - 0x34]
call fcn.0040e5e8
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x70]
call fcn.004045c0
push 0x416240
jmp 0x404bfe
cmp eax, 0x6d
je 0x404bf1
push 0
push 0xffffffffffffffff
push str.Read_Error
lea ecx, [ebp - 0x34]
call fcn.0040e5e8
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 3
push eax
lea ecx, [ebp - 0x70]
call fcn.004045c0
push 0x416240
jmp 0x404bfe
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.00410270
mov esp, ebp
pop ebp
ret 8
push 0
push 0xffffffffffffffff
push str.Failed_to_create_connection
lea ecx, [ebp - 0x34]
call fcn.0040e5e8
lea eax, [ebp - 0x34]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x70]
call fcn.004045c0
push 0x416240
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
lea ecx, [ebp - 0x70]
call fcn.00404650
push 0x416208
lea eax, [ebp - 0x70]
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3