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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x28
mov eax, dword [0x473b80]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push edi
xor edi, edi
mov dword [ebp - 0x18], eax
mov byte [ebp - 0xd], 0
cmp dword [esi + 0x52c], edi
je 0x42eaca
mov eax, dword [esi + 0x528]
mov ebx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, edi
jbe 0x42eaab
test eax, eax
je 0x42eaab
lea ebx, [ebx]
mov ecx, dword [esi + 0x52c]
mov edx, dword [ecx + edi*4]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov eax, dword [esi + 0x52c]
mov dword [eax + edi*4], 0
inc edi
cmp edi, dword [esi + 0x528]
jb 0x42ea80
mov ecx, dword [esi + 0x52c]
xor edi, edi
push ecx
push edi
mov dword [esi + 0x528], edi
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call ebx
mov dword [esi + 0x52c], edi
mov edx, dword [ebp - 0x18]
push edi
push 0x80
push 3
push edi
push edi
push 0x80000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
mov dword [ebp - 0x28], ebx
cmp ebx, 0xffffffff
je 0x42ecdc
lea eax, [ebp - 0x20]
push eax
push ebx
mov dword [ebp - 0x20], edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x18], eax
test al, 7
jne 0x42ecc0
cmp dword [ebp - 0x20], edi
jne 0x42ecc0
push 4
push 0x1000
push 0x1000
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov edi, eax
mov dword [ebp - 0x24], edi
test edi, edi
je 0x42ecc0
cmp dword [ebp - 0x18], 0
mov dword [ebp - 0x1c], 0
jbe 0x42ecb2
xor eax, eax
push eax
lea ecx, [ebp - 0x14]
push ecx
push 8
lea edx, [ebp - 0xc]
push edx
push ebx
mov dword [ebp - 0x14], eax
mov byte [ebp - 0xc], al
mov dword [ebp - 0xb], eax
mov word [ebp - 7], ax
mov byte [ebp - 5], al
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42eca6
cmp dword [ebp - 0x14], 8
jne 0x42eca6
push 8
lea ecx, [ebp - 0xc]
call fcn.0042f6b0
add esp, 4
cmp byte [ebp - 0xc], 0x11
sete al
and al, 1
cmp byte [ebp - 0xb], 0x20
sete cl
and al, cl
cmp byte [ebp - 0xa], 0xed
sete dl
and al, dl
cmp byte [ebp - 9], 0xfe
sete cl
test al, cl
je 0x42eca6
mov edx, dword [ebp - 8]
add edx, 0xfffffff5
cmp edx, 0x204
ja 0x42eca6
test byte [ebp - 8], 7
jne 0x42eca6
push 0x1000
push 0
push edi
call fcn.00449a10
mov ecx, dword [ebp - 8]
add esp, 0xc
push 0
lea eax, [ebp - 0x14]
push eax
add ecx, 0xfffffff8
push ecx
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x42eca6
mov edx, dword [ebp - 8]
mov eax, dword [ebp - 0x14]
add edx, 0xfffffff8
cmp eax, edx
jne 0x42eca6
push eax
mov ecx, edi
call fcn.0042f6b0
mov ebx, dword [esi + 0x528]
add esp, 4
lea eax, [ebx + 1]
mov dword [esi + 0x528], eax
test ebx, ebx
jne 0x42ec3c
push 4
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
jmp 0x42ec57
mov ecx, dword [esi + 0x52c]
add eax, eax
add eax, eax
push eax
push ecx
push 8
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapReAlloc]
mov edx, dword [ebp - 8]
add edx, 0xfffffff8
push edx
push 8
mov dword [esi + 0x52c], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov edi, eax
test edi, edi
je 0x42ec8d
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x24]
add eax, 0xfffffff8
push eax
push ecx
push edi
call fcn.004475b0
add esp, 0xc
mov edx, dword [esi + 0x52c]
mov dword [edx + ebx*4], edi
mov eax, dword [ebp - 8]
add dword [ebp - 0x1c], eax
mov ebx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x24]
mov byte [ebp - 0xd], 1
mov ecx, dword [ebp - 0x18]
cmp dword [ebp - 0x1c], ecx
jb 0x42eb44
push 0x8000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov al, byte [ebp - 0xd]
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00444627
mov esp, ebp
pop ebp
ret 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ecx, dword [ebp - 4]
pop edi
mov dword [esi + 0x24], eax
xor ecx, ebp
xor al, al
pop ebx
call fcn.00444627
mov esp, ebp
pop ebp
ret 4