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

Disassembly:
push 0x500
mov eax, 0x55305e
call fcn.00514880
mov dword [ebp - 0x50c], ecx
mov edi, dword [ebp + 8]
mov dword [ebp - 0x4f4], edi
call fcn.00483845
push eax
lea ecx, [ebp - 0x2bc]
call fcn.00480ed9
and dword [ebp - 4], 0
call fcn.004838ca
mov ecx, eax
call fcn.004816cb
test al, al
je 0x4c0879
call fcn.0047db95
push edi
lea ecx, [ebp - 0x2bc]
call fcn.00481127
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0x2bc]
call fcn.00481560
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4c0827
lea ecx, [ebp - 0x2bc]
call fcn.00481015
jmp 0x4c0969
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x4c0817
call fcn.00402160
and dword [ebp - 0x4f8], 0
push ebx
call fcn.00474ddd
pop ecx
push 0
mov edi, eax
lea eax, [ebp - 0x4f8]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4f8], ebx
je 0x4c0952
push edi
call fcn.00474de6
pop ecx
jmp 0x4c0817
call fcn.004838ca
push eax
lea ecx, [ebp - 0x2bc]
call fcn.0048110a
call fcn.00483c05
test al, al
je 0x4c089a
call fcn.004838d0
jmp 0x4c08b2
push 2
push 0
lea ecx, [ebp - 0x2bc]
call fcn.00481560
push eax
call fcn.004a7e50
add esp, 0xc
mov esi, eax
test esi, esi
je 0x4c0817
lea eax, [ebp - 0x4ec]
push eax
lea eax, [ebp - 0x508]
push eax
push 1
push edi
push esi
call fcn.004a7891
add esp, 0x14
test eax, eax
jne 0x4c0817
mov ebx, dword [ebp - 0x2c0]
test ebx, ebx
je 0x4c0817
push ebx
call fcn.00474ddd
push 3
push ebx
mov edi, eax
push edi
push dword [ebp - 0x508]
push esi
call fcn.004a8210
add esp, 0x18
mov dword [ebp - 0x4f0], eax
call fcn.00402160
mov eax, dword [ebp - 0x4f0]
test eax, eax
je 0x4c0942
cmp eax, 0x600
je 0x4c0942
push edi
call fcn.00474de6
pop ecx
call fcn.00483c05
test al, al
jne 0x4c0817
push esi
call fcn.004a76eb
jmp 0x4c0876
call fcn.00483c05
test al, al
jne 0x4c0952
push esi
call fcn.004a76eb
pop ecx
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x2bc]
call fcn.00481015
test edi, edi
jne 0x4c0ad9
and dword [ebp - 0x504], 0
and dword [ebp - 0x500], 0
and dword [ebp - 0x4fc], 0
push 0x37
pop ecx
mov esi, str.IgAUt1BEu8CmORWgjMsRQ0Rw93sshIf7n8WoITlMcw6qwZ1KKxKQJr6En5qpGsothCUc0WQME7fZgY608fGwoaE0MHyySyh2y739qupwXO3NTuDiKCq965kNQWnkyOAmXFA5XHAvGrTwlYTD3w5J5SdThZm09PzF3SsSzTx0b2StcQpVBwO3SzHIHGFklXBDQAVhoO0oJQDVcudI1p3yM9Xzmkn
mov dword [ebp - 4], 1
lea edi, [ebp - 0xec]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0xec]
push eax
lea ecx, [ebp - 0x220]
call fcn.004057d0
lea eax, [ebp - 0x220]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x504]
call fcn.00407f90
push 0
push 1
lea ecx, [ebp - 0x220]
call fcn.00479e2e
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x4f4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x4f4], eax
cmp eax, 0xffffffff
jne 0x4c0a05
lea ecx, [ebp - 0x504]
call fcn.00479e80
jmp 0x4c0ad5
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ebx, eax
test ebx, ebx
je 0x4c09f5
xor eax, eax
mov dword [ebp - 0x4f0], eax
mov dword [ebp - 0x214], eax
mov dword [ebp - 0x210], eax
mov dword [ebp - 0x20c], eax
push 0x46
pop ecx
mov esi, str.u0qujxQTlpLMbAMVRwUPlBk7H3QCJM5sAZqCyY3IxWUrLnMEZimo93LdNr1N2Zg1hv6mT1d4jDWEIidG7wT3LpDBF4qBjXZDtXCryKHtfRztxlQuzeXeAbrbmH5skDuG7JjxhxtBdMDzXSWOSi8iQZIv41jtx4cqs9PctuuZsm3RMObuWKq0wLAKVDym6csZcpOMnmHrQmfX3Hsc5S4V7mDqzsme7WUDWqIBWN5l0JmmNxkMj1qFIGRtbilSvBL8BmrrUdLFhTNKFzG7R1HkCTep
mov byte [ebp - 4], 3
lea edi, [ebp - 0x208]
rep movsd dword es:[edi], dword [esi]
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x238]
movsb byte es:[edi], byte [esi]
call fcn.004057d0
lea eax, [ebp - 0x238]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0x214]
call fcn.00407f90
push 0
push 1
lea ecx, [ebp - 0x238]
mov byte [ebp - 4], 3
call fcn.00479e2e
push ebx
call fcn.00474ddd
mov esi, dword [ebp - 0x4f4]
mov edi, eax
pop ecx
push 0
lea eax, [ebp - 0x4f0]
push eax
push ebx
push edi
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x4f0], ebx
je 0x4c0ab7
push edi
call fcn.00474de6
pop ecx
xor edi, edi
lea ecx, [ebp - 0x214]
call fcn.00479e80
or dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x504]
call fcn.00479e80
test edi, edi
jne 0x4c0ad9
xor eax, eax
jmp 0x4c0af4
mov ecx, dword [ebp - 0x50c]
push ebx
push edi
call fcn.004c0afc
push 1
push edi
mov esi, eax
call fcn.00474d90
pop ecx
pop ecx
mov eax, esi
call fcn.0051483b
ret 4