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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xa0
mov eax, dword [0x579aa4]
xor eax, ebp
mov dword [ebp - 0x18], eax
mov dword [ebp - 8], 0
push 0
push 0x80
push 3
push 0
push 7
push SysReAllocStringLen
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xffffffff
jne 0x4a8176
xor eax, eax
jmp 0x4a8408
lea ecx, [ebp - 0xc]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0xffffffff
jne 0x4a819e
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4a8408
cmp dword [ebp + 0x10], 0
je 0x4a81d5
cmp dword [ebp + 0x18], 0
jl 0x4a81d5
jg 0x4a81b2
cmp dword [ebp + 0x14], 0
jbe 0x4a81d5
mov ecx, dword [ebp + 0x18]
cmp ecx, dword [ebp - 0xc]
ja 0x4a81d5
jb 0x4a81c4
mov edx, dword [ebp + 0x14]
cmp edx, dword [ebp - 0x10]
jae 0x4a81d5
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x4a8408
mov dword [ebp - 0x84], 0x100000
mov dword [ebp - 0x88], 0x200000
mov dword [ebp - 0x8c], 0
lea ecx, [ebp - 4]
call fcn.004a8440
push 0
lea ecx, [ebp - 0x80]
push ecx
call fcn.004c3c50
add esp, 8
cmp dword [ebp - 0xc], 0
ja 0x4a8218
cmp dword [ebp - 0x10], 0x200000
jbe 0x4a8222
cmp dword [ebp + 0x10], 0
je 0x4a82a9
mov edx, dword [ebp - 0x10]
push edx
lea ecx, [ebp - 4]
call fcn.004a8460
movzx eax, al
test eax, eax
je 0x4a82a4
push 0
lea ecx, [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 0x10]
push edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a829c
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov dword [ebp - 0xa0], edx
mov dword [ebp - 0x9c], eax
mov ecx, dword [ebp - 0xa0]
cmp ecx, dword [ebp - 0x10]
jne 0x4a829c
mov edx, dword [ebp - 0x9c]
cmp edx, dword [ebp - 0xc]
jne 0x4a829c
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x80]
push edx
call fcn.004c3cb0
add esp, 0xc
lea ecx, [ebp - 4]
call fcn.004a84c0
jmp 0x4a83a8
push 0x100000
lea ecx, [ebp - 4]
call fcn.004a8460
movzx eax, al
test eax, eax
je 0x4a830f
push 0
lea ecx, [ebp - 0x8c]
push ecx
push 0x100000
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp - 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a8307
cmp dword [ebp - 0x8c], 0x100000
jne 0x4a8307
mov dword [ebp - 8], 1
mov ecx, dword [ebp - 0x8c]
push ecx
mov edx, dword [ebp - 4]
push edx
lea eax, [ebp - 0x80]
push eax
call fcn.004c3cb0
add esp, 0xc
lea ecx, [ebp - 4]
call fcn.004a84c0
mov dword [ebp - 0x90], 0x100000
cmp dword [ebp - 8], 0
je 0x4a83a8
push 2
push 0
push 0xfff00000
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4a83a8
mov dword [ebp - 8], 0
push 0x100000
lea ecx, [ebp - 4]
call fcn.004a8460
movzx edx, al
test edx, edx
je 0x4a83a8
push 0
lea eax, [ebp - 0x8c]
push eax
push 0x100000
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x14]
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4a83a0
cmp dword [ebp - 0x8c], 0x100000
jne 0x4a83a0
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 4]
push ecx
lea edx, [ebp - 0x80]
push edx
call fcn.004c3cb0
add esp, 0xc
lea ecx, [ebp - 4]
call fcn.004a84c0
lea eax, [ebp - 0x80]
push eax
call fcn.004c4ce0
add esp, 4
mov ecx, dword [ebp - 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 8], 0
jne 0x4a83de
mov dword [ebp - 0x94], 0
lea ecx, [ebp - 4]
call fcn.004a8420
mov eax, dword [ebp - 0x94]
jmp 0x4a8408
push 0x10
lea edx, [ebp - 0x28]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.0050dd70
add esp, 0xc
mov dword [ebp - 0x98], 1
lea ecx, [ebp - 4]
call fcn.004a8420
mov eax, dword [ebp - 0x98]
mov ecx, dword [ebp - 0x18]
xor ecx, ebp
call fcn.0050c75f
mov esp, ebp
pop ebp
ret