Function at 0x405aa4
Capabilities:
Get common file path
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffec
push ebx
push esi
push edi
xor eax, eax
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x405e02
push dword fs:[eax]
mov dword fs:[eax], esp
mov dword [0x4095f0], 0x8e00
mov word [0x4097ac], 0
push 0
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_GetFileSize_1
cmp eax, dword [0x4095f0]
jle 0x405aed
call fcn.00405750
xor edx, edx
mov eax, dword [0x4095f0]
call fcn.00403a3c
push 0
lea eax, [ebp - 8]
push eax
push 3
lea eax, [ebp - 3]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp dword [ebp - 8], 3
jne 0x405dec
lea eax, [ebp - 0x14]
lea edx, [ebp - 3]
mov ecx, 3
call fcn.00402bf4
mov eax, dword [ebp - 0x14]
mov edx, 0x405e18
call fcn.00402d1c
jne 0x405ddf
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xa]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
test byte [ebp - 0xa], 1
jne 0x405b61
mov byte [0x4081e0], 0
test byte [ebp - 0xa], 2
jne 0x405b6e
mov byte [0x4081dc], 0
mov al, byte [ebp - 0xa]
and al, 4
cmp al, 4
jne 0x405b7e
mov byte [0x4081e4], 1
mov al, byte [ebp - 0xa]
and al, 0x18
sub al, 8
je 0x405b8d
sub al, 8
je 0x405b99
jmp 0x405ba3
mov dword [0x4081e8], 0x1f5
jmp 0x405ba3
mov dword [0x4081e8], 0x1f6
mov al, byte [ebp - 0xa]
and al, 0x40
cmp al, 0x40
jne 0x405bb3
mov byte [0x4081ec], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xb]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp byte [ebp - 0xb], 0
jbe 0x405bd7
mov byte [0x4081d8], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 9]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp byte [ebp - 9], 0
jbe 0x405bfb
mov byte [0x4081d4], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xa]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp byte [ebp - 0xa], 0
jbe 0x405c1f
mov byte [0x4081d0], 1
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xe]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp word [ebp - 0xe], 0
jbe 0x405c44
mov byte [0x4081f0], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
cmp byte [ebp - 0xc], 0
jbe 0x405c68
mov byte [0x4081f4], 1
cmp byte [0x4081d8], 0
je 0x405c8e
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xb]
push eax
mov eax, dword [0x409634]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
xor eax, eax
mov al, byte [ebp - 0xb]
mov edx, dword [0x409634]
mov byte [edx + eax], 0
cmp byte [0x4081d4], 0
je 0x405cff
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 9]
push eax
mov eax, dword [0x40962c]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
xor eax, eax
mov al, byte [ebp - 9]
mov edx, dword [0x40962c]
mov byte [edx + eax], 0
lea eax, [ebp - 0x14]
mov edx, dword [0x40962c]
call fcn.00402bc4
mov eax, dword [ebp - 0x14]
mov edx, 0x405e24
call fcn.00402d1c
jne 0x405cff
mov eax, dword [0x40962c]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
cmp byte [0x4081d0], 0
je 0x405d25
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xa]
push eax
mov eax, dword [0x409630]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
xor eax, eax
mov al, byte [ebp - 0xa]
mov edx, dword [0x409630]
mov byte [edx + eax], 0
xor eax, eax
mov dword [0x409638], eax
cmp byte [0x4081f0], 0
je 0x405d7d
movzx eax, word [ebp - 0xe]
inc eax
call fcn.004023c0
mov dword [0x409638], eax
push 0
lea eax, [ebp - 8]
push eax
movzx eax, word [ebp - 0xe]
push eax
mov eax, dword [0x409638]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
movzx eax, word [ebp - 0xe]
mov edx, dword [0x409638]
mov byte [edx + eax], 0
xor eax, eax
mov dword [0x40963c], eax
cmp byte [0x4081f4], 0
je 0x405dc9
xor eax, eax
mov al, byte [ebp - 0xc]
inc eax
call fcn.004023c0
mov dword [0x40963c], eax
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xc]
push eax
mov eax, dword [0x40963c]
push eax
mov eax, dword [0x4097b4]
push eax
call sub.kernel32.dll_ReadFile_1
xor eax, eax
mov al, byte [ebp - 0xc]
mov edx, dword [0x40963c]
mov byte [edx + eax], 0
mov edx, 1
xor eax, eax
call fcn.00403a3c
add eax, 2
mov dword [0x4095f0], eax
jmp 0x405dec
movzx eax, word [0x4097ac]
add dword [0x4095f0], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x405e09
lea eax, [ebp - 0x14]
call fcn.00402ab4
ret