Function at 0x4041c4
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b0bd
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x144
cmp dword [ebp + 8], 0
jne 0x4041f7
push 6
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x4044ba
mov eax, dword [ebp + 8]
mov dword [ebp - 0x20], eax
cmp dword [ebp + 0xc], 0
je 0x404219
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.0040607a
add esp, 4
mov eax, 1
jmp 0x4044ba
mov ecx, dword [ebp - 0x20]
add ecx, 0x44
call fcn.00406b20
push eax
mov ecx, dword [ebp - 0x20]
add ecx, 0x44
call fcn.00406b00
push eax
call fcn.00409ec0
add esp, 8
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040410a
add esp, 4
lea eax, [ebp - 0x130]
push eax
lea ecx, [ebp - 0x118]
call fcn.00406a60
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x118]
push ecx
mov edx, dword [ebp - 0x20]
add edx, 0x44
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x134], esp
push edx
call fcn.004065d0
mov dword [ebp - 0x14c], eax
call fcn.004044c8
add esp, 0x14
push 0
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
add ecx, 0x14
push ecx
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx]
push edx
push 1
push 0xe0
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.MSVCRT.dll_fread]
add esp, 0x10
lea ecx, [ebp - 0x118]
push ecx
call fcn.00404963
add esp, 4
mov dword [ebp - 0x28], eax
mov edx, dword [ebp - 0x20]
push edx
call fcn.00404a18
add esp, 4
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x118]
push eax
call fcn.00404a70
add esp, 4
mov dword [ebp - 0x10], eax
mov ecx, dword [ebp - 0x28]
add ecx, 3
and ecx, 0xfffffffc
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x18]
add edx, 3
and edx, 0xfffffffc
mov dword [ebp - 0x18], edx
mov eax, dword [ebp - 0x28]
add eax, dword [ebp - 0x18]
add eax, dword [ebp - 0x10]
mov dword [ebp - 0x12c], eax
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ebp - 0x12c]
lea eax, [edx + ecx - 1]
mov ecx, dword [ebp - 0xe4]
sub ecx, 1
not ecx
and eax, ecx
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0xe8]
push edx
mov eax, dword [ebp - 0xe4]
push eax
mov ecx, dword [ebp - 0xd0]
push ecx
mov edx, dword [ebp - 0x12c]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.0040613a
add esp, 0x14
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4043aa
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040607a
add esp, 4
mov dword [ebp - 0x138], 0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.00406aa0
mov eax, dword [ebp - 0x138]
jmp 0x4044ba
mov eax, dword [ebp - 0x24]
push eax
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add esp, 4
mov dword [ebp - 0x13c], eax
mov ecx, dword [ebp - 0x13c]
mov dword [ebp - 0x1c], ecx
mov edx, dword [ebp - 0x24]
push edx
push 0
mov eax, dword [ebp - 0x1c]
push eax
call sub.MSVCRT.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x1c]
add ecx, dword [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x128]
push eax
call fcn.00404b49
add esp, 0xc
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x28]
push edx
sub esp, 0x10
mov ecx, esp
mov dword [ebp - 0x140], esp
lea eax, [ebp - 0x128]
push eax
call fcn.004064e0
mov dword [ebp - 0x150], eax
mov ecx, dword [ebp - 0x1c]
push ecx
lea edx, [ebp - 0x118]
push edx
mov eax, dword [ebp - 0x20]
push eax
call fcn.00404c8b
add esp, 0x24
push 0
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0x1c]
push edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax]
push ecx
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov edx, dword [ebp - 0x20]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp - 0x24]
push ecx
push 1
mov edx, dword [ebp - 0x1c]
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
add esp, 0x10
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x144], eax
mov ecx, dword [ebp - 0x144]
push ecx
call sub.MSVCRT.dll_void___cdecl_operator_delete_void__
add esp, 4
mov edx, dword [ebp - 0x20]
push edx
call fcn.0040607a
add esp, 4
mov dword [ebp - 0x148], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x128]
call fcn.004064c0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x118]
call fcn.00406aa0
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret