Function at 0x4051d0
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x431b21
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x3c
mov dword [ebp - 0x38], 0
mov dword [ebp - 4], 0
mov dword [ebp - 0x18], 0xffffffff
push 0
push 0
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp + 0xc]
call fcn.0040c5e0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x18], eax
cmp dword [ebp - 0x18], 0xffffffff
jne 0x405254
push 0x4338cc
mov ecx, dword [ebp + 8]
call fcn.00408c10
mov eax, dword [ebp - 0x38]
or eax, 1
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00408cf0
mov eax, dword [ebp + 8]
jmp 0x405447
push 0
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4052a0
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4338d0
mov ecx, dword [ebp + 8]
call fcn.00408c10
mov eax, dword [ebp - 0x38]
or eax, 1
mov dword [ebp - 0x38], eax
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00408cf0
mov eax, dword [ebp + 8]
jmp 0x405447
mov ecx, dword [ebp - 0x10]
add ecx, 0xa
push ecx
call fcn.00424dd7
add esp, 4
mov dword [ebp - 0x24], eax
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x10]
add eax, 0xa
push eax
push 0
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00416e10
add esp, 0xc
mov dword [ebp - 0x14], 0
push 0
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x14]
je 0x40534a
cmp dword [ebp - 0x20], 0
je 0x405313
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp - 0x28]
push edx
call fcn.00424dd2
add esp, 4
mov dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4338d4
mov ecx, dword [ebp + 8]
call fcn.00408c10
mov ecx, dword [ebp - 0x38]
or ecx, 1
mov dword [ebp - 0x38], ecx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00408cf0
mov eax, dword [ebp + 8]
jmp 0x405447
mov edx, dword [ebp - 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x4338d8
lea ecx, [ebp - 0x1c]
call fcn.00408c10
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x20]
movzx ecx, byte [eax]
cmp ecx, 0xff
jne 0x4053bc
mov edx, dword [ebp - 0x20]
movzx eax, byte [edx + 1]
cmp eax, 0xfe
jne 0x4053bc
mov ecx, dword [ebp - 0x10]
push ecx
mov edx, dword [ebp - 0x20]
push edx
lea eax, [ebp - 0x2c]
push eax
call fcn.004074d0
add esp, 0xc
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x40], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x40]
push edx
lea ecx, [ebp - 0x1c]
call fcn.00408d10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x2c]
call fcn.00408cf0
jmp 0x4053f5
mov eax, dword [ebp - 0x10]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.00407160
add esp, 0xc
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 3
mov ecx, dword [ebp - 0x48]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.00408d10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x30]
call fcn.00408cf0
cmp dword [ebp - 0x20], 0
je 0x405414
mov edx, dword [ebp - 0x20]
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 0x34]
push eax
call fcn.00424dd2
add esp, 4
mov dword [ebp - 0x20], 0
lea ecx, [ebp - 0x1c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00408bf0
mov edx, dword [ebp - 0x38]
or edx, 1
mov dword [ebp - 0x38], edx
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x1c]
call fcn.00408cf0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp + 0xc]
call fcn.00408cf0
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov esp, ebp
pop ebp
ret