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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x30
push ebx
xor eax, eax
push esi
push edi
cmp dword [ebp + 0xc], eax
je 0x404a48
cmp dword [ebp + 0x10], eax
je 0x404a48
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 0xc]
lea esi, [ebp - 0x14]
mov dword [ebp - 8], eax
call fcn.00405a50
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x18], eax
mov edi, dword [ebp + 8]
mov ebx, dword [edi + 0x10]
lea esi, [ebp - 0x24]
call fcn.00405a50
mov eax, dword [ebp - 0x1c]
xor edi, edi
cmp eax, edi
je 0x404870
cmp eax, dword [ebp - 0x24]
je 0x404875
call fcn.004123b5
mov eax, dword [ebp - 0x18]
cmp eax, dword [ebp - 0x20]
je 0x404a43
lea esi, [ebp - 0x1c]
call fcn.00404b49
cmp dword [eax], 1
jne 0x4048dc
call fcn.00404b49
cmp dword [eax + 4], edi
je 0x4048dc
call fcn.00404b49
mov eax, dword [eax + 8]
mov edi, dword [ebp - 8]
add eax, edi
cmp eax, dword [ebp + 0x10]
ja 0x404a43
call fcn.00404b49
push dword [eax + 8]
call fcn.00404b49
push dword [eax + 4]
mov eax, dword [ebp + 0xc]
add eax, edi
push eax
call fcn.00414d40
add esp, 0xc
call fcn.00404b49
add edi, dword [eax + 8]
mov dword [ebp - 8], edi
jmp 0x404a2c
lea esi, [ebp - 0x1c]
call fcn.00404b49
cmp dword [eax], 2
jne 0x40495c
call fcn.00404b49
mov eax, dword [eax + 8]
mov ecx, dword [ebp - 8]
lea eax, [eax + ecx + 4]
cmp eax, dword [ebp + 0x10]
ja 0x404a43
call fcn.00404b49
mov eax, dword [eax + 8]
mov edi, dword [ebp - 8]
mov ebx, dword [ebp + 0xc]
mov dword [edi + ebx], eax
call fcn.00404b49
cmp dword [eax + 4], 0
je 0x404945
call fcn.00404b49
cmp dword [eax + 8], 0
je 0x404945
call fcn.00404b49
push dword [eax + 8]
call fcn.00404b49
push dword [eax + 4]
lea eax, [edi + ebx + 4]
push eax
call fcn.00414d40
add esp, 0xc
lea esi, [ebp - 0x1c]
call fcn.00404b49
mov eax, dword [eax + 8]
lea eax, [edi + eax + 4]
mov dword [ebp - 8], eax
jmp 0x404a2c
call fcn.00404b49
cmp dword [eax], 3
jne 0x404a2c
lea esi, [ebp - 0x1c]
call fcn.00404b49
cmp dword [eax + 4], edi
je 0x404a2c
push edi
push 0x80
push 3
push edi
push 1
push SysReAllocStringLen
call fcn.00404b49
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, edi
je 0x404a2c
cmp ebx, 0xffffffff
je 0x404a2c
mov edi, dword [ebp + 0x10]
mov esi, dword [sym.imp.KERNEL32.dll_GetFileSize]
sub edi, dword [ebp - 8]
push 0
push ebx
call esi
cmp edi, eax
jae 0x4049c6
mov dword [ebp - 0xc], edi
jmp 0x4049ce
push 0
push ebx
call esi
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0xc]
cmp eax, 0x3200000
jae 0x404a3c
mov edi, dword [ebp - 8]
add eax, edi
cmp eax, dword [ebp + 0x10]
ja 0x404a3c
mov eax, dword [ebp + 0xc]
xor esi, esi
mov dword [ebp - 0x10], esi
add edi, eax
mov ecx, dword [ebp - 0xc]
sub ecx, esi
mov eax, 0x400
cmp ecx, eax
ja 0x4049fc
mov eax, ecx
push 0
lea ecx, [ebp - 0x10]
push ecx
push eax
lea eax, [edi + esi]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x404a22
cmp dword [ebp - 0x10], 0
jbe 0x404a22
cmp esi, dword [ebp - 0xc]
ja 0x404a22
add esi, dword [ebp - 0x10]
jmp 0x4049ec
add dword [ebp - 8], esi
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edi, [ebp - 0x2c]
lea esi, [ebp - 0x1c]
call fcn.00404b71
jmp 0x404854
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 8]
jmp 0x404a4a
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret 0xc