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

Disassembly:
push 0x3d4
mov eax, 0x6550ed
call fcn.004ce655
mov dword [ebp - 0x3e0], ecx
mov esi, dword [ebp + 8]
mov dword [ebp - 0x3d4], esi
call fcn.00419b10
push eax
lea ecx, [ebp - 0x94]
call fcn.0040ee00
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00419b20
mov ecx, eax
call fcn.0040fed0
test al, al
je 0x4023d1
push esi
lea ecx, [ebp - 0x94]
call fcn.0040f370
push ebx
push 0x80
push 3
push ebx
push 1
push SysReAllocString
lea ecx, [ebp - 0x94]
call fcn.0040f230
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.0040efe0
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.004cdd57
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.004cdd60
pop ecx
jmp 0x402367
call fcn.00419b20
push eax
lea ecx, [ebp - 0x94]
call fcn.0040f340
call fcn.00419b40
push eax
lea ecx, [ebp - 0x19c]
call fcn.0040ee00
mov byte [ebp - 4], 1
call fcn.00419f50
or ebx, 0xffffffff
test al, al
je 0x402415
call fcn.00419b30
mov edi, eax
mov dword [ebp - 0x3d0], edi
jmp 0x4024a7
lea ecx, [ebp - 0x19c]
call fcn.0040f230
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.004cdd57
mov esi, eax
pop ecx
test esi, esi
je 0x402478
push dword [ebp - 0x3d8]
push 0
push esi
call fcn.004e5a10
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.0040f230
push eax
call fcn.00424730
mov edi, eax
mov dword [ebp - 0x3d0], edi
pop ecx
pop ecx
test esi, esi
je 0x4024a1
push esi
call fcn.004cdd60
pop ecx
mov esi, dword [ebp - 0x3d4]
test edi, edi
jne 0x4024bb
lea ecx, [ebp - 0x19c]
call fcn.0040efe0
jmp 0x402367
and dword [ebp - 0x3dc], 0
lea ecx, [ebp - 0x118]
push ebx
push esi
call fcn.0040ee40
push 0x6da5d4
push 0x6da5d0
lea ecx, [ebp - 0x118]
mov byte [ebp - 4], 2
call fcn.004102c0
lea eax, [ebp - 0x3cc]
push eax
lea eax, [ebp - 0x3dc]
push eax
push 1
lea ecx, [ebp - 0x118]
call fcn.0040f230
push eax
push edi
call fcn.00423a20
add esp, 0x14
test eax, eax
je 0x40251e
lea ecx, [ebp - 0x118]
call fcn.0040efe0
jmp 0x4024ab
mov edi, dword [ebp - 0x1a0]
test edi, edi
je 0x402511
push edi
call fcn.004cdd57
push edi
mov esi, eax
push esi
push dword [ebp - 0x3dc]
push dword [ebp - 0x3d0]
call fcn.00424fc0
add esp, 0x14
test eax, eax
je 0x40256f
cmp eax, 0x600
je 0x40256f
push esi
call fcn.004cdd60
pop ecx
call fcn.00419f50
test al, al
jne 0x402511
push dword [ebp - 0x3d0]
call fcn.00423640
pop ecx
jmp 0x402511
call fcn.00419f50
test al, al
jne 0x402584
push dword [ebp - 0x3d0]
call fcn.00423640
pop ecx
lea ecx, [ebp - 0x118]
call fcn.0040efe0
lea ecx, [ebp - 0x19c]
call fcn.0040efe0
lea ecx, [ebp - 0x94]
mov dword [ebp - 4], ebx
call fcn.0040efe0
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.004cdd57
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.004cdd60
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.004cdd26
pop ecx
pop ecx
mov al, 1
call fcn.004ce5ff
ret 4