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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6526c1
mov eax, dword fs:[0]
push eax
sub esp, 0x3d4
mov eax, dword [0x6ee06c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x3e0], ecx
mov esi, dword [ebp + 8]
lea eax, [ebp - 0xa0]
push 0x84
push 0
push eax
mov dword [ebp - 0x3dc], esi
call fcn.004e7e00
add esp, 0xc
call fcn.0042af90
push eax
lea ecx, [ebp - 0xa0]
call fcn.00439530
mov dword [ebp - 4], 0
call fcn.0042afa0
mov ecx, eax
call fcn.0043a600
test al, al
je 0x403080
push esi
lea ecx, [ebp - 0xa0]
call fcn.00439ae0
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
lea ecx, [ebp - 0xa0]
call fcn.004399a0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403009
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], eax
call fcn.004347f0
jmp 0x4032a0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x40302f
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.004347f0
jmp 0x4032a0
push edi
mov dword [ebp - 0x14], 0
call fcn.00424273
add esp, 4
mov esi, eax
lea eax, [ebp - 0x14]
push 0
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 - 0x14], edi
je 0x40328a
push esi
call fcn.00423c26
add esp, 4
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0xa0]
call fcn.004347f0
jmp 0x4032a0
call fcn.0042afa0
push eax
lea ecx, [ebp - 0xa0]
call fcn.00439ab0
push 0x84
lea eax, [ebp - 0x1a8]
push 0
push eax
call fcn.004e7e00
add esp, 0xc
call fcn.0042afc0
push eax
lea ecx, [ebp - 0x1a8]
call fcn.00439530
mov byte [ebp - 4], 1
call fcn.0042b3d0
test al, al
je 0x4030d1
call fcn.0042afb0
mov ebx, eax
jmp 0x40315c
lea ecx, [ebp - 0x1a8]
call fcn.004399a0
mov edi, eax
test edi, edi
je 0x403130
mov ebx, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push edi
push 0
push 0
call ebx
mov dword [ebp - 0x14], eax
inc eax
push eax
mov dword [ebp - 0x18], eax
call fcn.00424273
mov esi, eax
add esp, 4
test esi, esi
je 0x403130
push dword [ebp - 0x18]
push 0
push esi
call fcn.004e7e00
add esp, 0xc
push 0
push 0
push dword [ebp - 0x14]
push esi
push 0xffffffffffffffff
push edi
push 0
push 0
call ebx
jmp 0x403132
xor esi, esi
push esi
lea ecx, [ebp - 0xa0]
call fcn.004399a0
push eax
call fcn.0043c420
add esp, 8
mov ebx, eax
test esi, esi
je 0x403156
push esi
call fcn.00423c26
add esp, 4
mov esi, dword [ebp - 0x3dc]
test ebx, ebx
jne 0x403182
lea ecx, [ebp - 0x1a8]
call fcn.004347f0
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.004347f0
jmp 0x4032a0
push 0x84
lea eax, [ebp - 0x124]
mov dword [ebp - 0x1c], 0
push 0
push eax
call fcn.004e7e00
add esp, 0xc
lea ecx, [ebp - 0x124]
push 0xffffffffffffffff
push esi
call fcn.00439570
push 0x6d6eb0
push 0x6d6ddc
lea ecx, [ebp - 0x124]
mov byte [ebp - 4], 2
call fcn.0043a9f0
lea eax, [ebp - 0x3d8]
push eax
lea eax, [ebp - 0x1c]
push eax
push 1
lea ecx, [ebp - 0x124]
call fcn.004399a0
push eax
push ebx
call fcn.0043b710
add esp, 0x14
test eax, eax
je 0x4031fc
lea ecx, [ebp - 0x124]
call fcn.004347f0
jmp 0x403160
mov edi, dword [ebp - 0x1ac]
test edi, edi
jne 0x403216
lea ecx, [ebp - 0x124]
call fcn.004347f0
jmp 0x403160
push edi
call fcn.00424273
push edi
mov esi, eax
push esi
push dword [ebp - 0x1c]
push ebx
call fcn.0043ccb0
add esp, 0x14
test eax, eax
je 0x403262
cmp eax, 0x600
je 0x403262
push esi
call fcn.00423c26
add esp, 4
call fcn.0042b3d0
test al, al
jne 0x403252
push ebx
call fcn.0043b330
add esp, 4
lea ecx, [ebp - 0x124]
call fcn.004347f0
jmp 0x403160
call fcn.0042b3d0
test al, al
jne 0x403274
push ebx
call fcn.0043b330
add esp, 4
lea ecx, [ebp - 0x124]
call fcn.004347f0
lea ecx, [ebp - 0x1a8]
call fcn.004347f0
lea ecx, [ebp - 0xa0]
mov dword [ebp - 4], 0xffffffff
call fcn.004347f0
test esi, esi
jne 0x403316
push 0
push 0x80
push 3
push 0
push 1
push SysReAllocString
push dword [ebp - 0x3dc]
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403312
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
je 0x403312
push edi
mov dword [ebp - 0x18], 0
call fcn.00424273
add esp, 4
mov esi, eax
lea eax, [ebp - 0x18]
push 0
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 - 0x18], edi
je 0x40330e
push esi
call fcn.00423c26
add esp, 4
xor al, al
jmp 0x40333c
test esi, esi
jne 0x403316
xor al, al
jmp 0x40333c
mov ecx, dword [ebp - 0x3e0]
cmp byte [ecx + 0x678], 0
je 0x40332f
mov eax, dword [ecx]
push edi
push esi
call dword [eax + 0x194]
push 1
push esi
call fcn.00424265
add esp, 8
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00423c15
mov esp, ebp
pop ebp
ret 4