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

Disassembly:
push 0x3d4
mov eax, 0x65507d
call fcn.004ce5e8
mov dword [ebp - 0x3e0], ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x3d4], esi
call fcn.00419aa0
push eax
lea ecx, [ebp - 0x94]
call fcn.0040ed90
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00419ab0
mov ecx, eax
call fcn.0040fe60
test al, al
je 0x4023d1
push esi
lea ecx, [ebp - 0x94]
call fcn.0040f300
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.0040f1c0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
or ebx, 0xffffffff
mov dword [ebp - 0x3d0], eax
cmp eax, ebx
jne 0x40237a
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], ebx
call fcn.0040ef70
jmp 0x4025ac
push 0
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x402367
and dword [ebp - 0x3d8], 0
push edi
call fcn.004cdce7
pop ecx
push 0
mov esi, eax
lea eax, [ebp - 0x3d8]
push eax
push edi
push esi
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_ReadFile]
push dword [ebp - 0x3d0]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d8], edi
je 0x40259a
push esi
call fcn.004cdcf0
pop ecx
jmp 0x402367
call fcn.00419ab0
push eax
lea ecx, [ebp - 0x94]
call fcn.0040f2d0
call fcn.00419ad0
push eax
lea ecx, [ebp - 0x19c]
call fcn.0040ed90
mov byte [ebp - 4], 1
call fcn.00419ee0
or ebx, 0xffffffff
test al, al
je 0x402415
call fcn.00419ac0
mov edi, eax
mov dword [ebp - 0x3d0], edi
jmp 0x4024a7
lea ecx, [ebp - 0x19c]
call fcn.0040f1c0
mov edi, eax
test edi, edi
je 0x402478
xor eax, eax
push eax
push eax
push eax
push eax
push ebx
push edi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov dword [ebp - 0x3d0], eax
inc eax
push eax
mov dword [ebp - 0x3d8], eax
call fcn.004cdce7
mov esi, eax
pop ecx
test esi, esi
je 0x402478
push dword [ebp - 0x3d8]
push 0
push esi
call fcn.004e59a0
add esp, 0xc
xor eax, eax
push eax
push eax
push dword [ebp - 0x3d0]
push esi
push ebx
push edi
push eax
push eax
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
jmp 0x40247a
xor esi, esi
push esi
lea ecx, [ebp - 0x94]
call fcn.0040f1c0
push eax
call fcn.004246c0
mov edi, eax
mov dword [ebp - 0x3d0], edi
pop ecx
pop ecx
test esi, esi
je 0x4024a1
push esi
call fcn.004cdcf0
pop ecx
mov esi, dword [ebp - 0x3d4]
test edi, edi
jne 0x4024bb
lea ecx, [ebp - 0x19c]
call fcn.0040ef70
jmp 0x402367
and dword [ebp - 0x3dc], 0
lea ecx, [ebp - 0x118]
push ebx
push esi
call fcn.0040edd0
push 0x6da5e4
push 0x6da5e0
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 2
call fcn.00410250
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3dc]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.0040f1c0
push eax
push edi
call fcn.004239b0
add esp, 0x14
test eax, eax
je 0x40251e
lea ecx, [ebp - 0x118]
call fcn.0040ef70
jmp 0x4024ab
mov edi, dword [ebp - 0x1a0]
test edi, edi
je 0x402511
push edi
call fcn.004cdce7
push edi
mov esi, eax
push esi
push dword [ebp - 0x3dc]
push dword [ebp - 0x3d0]
call fcn.00424f50
add esp, 0x14
test eax, eax
je 0x40256f
cmp eax, 0x600
je 0x40256f
push esi
call fcn.004cdcf0
pop ecx
call fcn.00419ee0
test al, al
jne 0x402511
push dword [ebp - 0x3d0]
call fcn.004235d0
pop ecx
jmp 0x402511
call fcn.00419ee0
test al, al
jne 0x402584
push dword [ebp - 0x3d0]
call fcn.004235d0
pop ecx
lea ecx, [ebp - 0x118]
call fcn.0040ef70
lea ecx, [ebp - 0x19c]
call fcn.0040ef70
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], ebx
call fcn.0040ef70
test esi, esi
jne 0x40262a
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x3d4]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x3d4], eax
cmp eax, ebx
je 0x402626
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x402626
push edi
mov dword [ebp - 0x3d0], ebx
call fcn.004cdce7
pop ecx
push ebx
mov ebx, dword [ebp - 0x3d4]
mov esi, eax
lea eax, [ebp - 0x3d0]
push eax
push edi
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x3d0], edi
je 0x402622
push esi
call fcn.004cdcf0
pop ecx
xor esi, esi
test esi, esi
jne 0x40262a
xor al, al
jmp 0x402651
mov eax, dword [ebp - 0x3e0]
cmp byte [eax + 0x678], 0
je 0x402645
mov edx, dword [eax]
mov ecx, eax
push edi
push esi
call dword [edx + 0x194]
push 1
push esi
call fcn.004cdcb6
pop ecx
pop ecx
mov al, 1
call fcn.004ce592
ret 4