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

Disassembly:
push 0xffffffffffffffff
push 0x41e5f8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0xc
push ebx
push ebp
push esi
push edi
mov esi, ecx
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
lea ecx, [esp + 0x44]
mov dword [esp + 0x3c], 1
call fcn.00402cb0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebp, eax
cmp ebp, 0xffffffff
je 0x405285
push ebx
push ebp
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
cmp edi, 0xffffffff
mov dword [esp + 0x14], edi
je 0x405132
mov eax, dword [esi + 0x24]
cmp eax, ebx
je 0x40511f
push eax
call fcn.0041563a
add esp, 4
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
inc edi
push edi
call fcn.0041563f
mov edx, eax
add esp, 4
cmp edx, ebx
mov dword [esi + 0x24], edx
jne 0x40516e
push ebp
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], bl
call fcn.00401910
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0xffffffff
call fcn.00401910
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
mov ecx, edi
mov edi, edx
mov edx, ecx
shr ecx, 2
xor eax, eax
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esp + 0x14]
mov ecx, dword [esi + 0x24]
push ebx
lea eax, [esp + 0x14]
push eax
push edi
push ecx
push ebp
mov dword [esp + 0x24], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
push ebp
jne 0x4051eb
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esi + 0x24]
push eax
call fcn.0041563a
add esp, 4
lea ecx, [esp + 0x2c]
mov dword [esi + 0x24], ebx
mov byte [esp + 0x24], bl
call fcn.00401910
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0xffffffff
call fcn.00401910
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [esp + 0x10], edi
mov eax, dword [esi + 0x24]
jne 0x4051aa
lea ecx, [esp + 0x30]
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
call fcn.00401d50
test eax, eax
push ebx
je 0x40522a
push ecx
mov ecx, esp
mov dword [esp + 0x1c], esp
push 0x420550
call fcn.00402390
mov ecx, esi
call fcn.00404cd0
mov edi, eax
jmp 0x40526c
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x1c]
push 0x5b
push eax
call fcn.00402680
add esp, 8
mov ecx, esp
mov dword [esp + 0x20], esp
push 0x5d
push eax
push ecx
mov byte [esp + 0x38], 2
call fcn.004027b0
add esp, 0xc
mov ecx, esi
call fcn.00404cd0
lea ecx, [esp + 0x14]
mov edi, eax
mov byte [esp + 0x24], 1
call fcn.00401910
cmp edi, ebx
jne 0x4052ba
mov eax, dword [esi + 0x24]
push eax
call fcn.0041563a
add esp, 4
mov dword [esi + 0x24], ebx
mov dword [esi + 0x28], ebx
mov dword [esi + 0x2c], ebx
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], bl
call fcn.00401910
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0xffffffff
call fcn.00401910
xor eax, eax
mov ecx, dword [esp + 0x1c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
ret 8
lea ecx, [esp + 0x2c]
mov byte [esp + 0x24], bl
call fcn.00401910
lea ecx, [esp + 0x30]
mov dword [esp + 0x24], 0xffffffff
call fcn.00401910
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov eax, 1
mov dword fs:[0], ecx
pop ebx
add esp, 0x18
ret 8