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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffe8
xor eax, eax
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x4065cf
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0x408288]
mov dword [eax], 0x8e00
mov dword [eax + 4], 0
mov eax, dword [0x408294]
mov word [eax], 0
push 0
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_GetFileSize
mov ecx, eax
mov eax, dword [0x408288]
mov eax, dword [eax]
cmp ecx, eax
jbe 0x406285
call fcn.00405e00
mov eax, dword [0x408288]
push dword [eax + 4]
push dword [eax]
xor eax, eax
call fcn.00403f84
push 0
lea eax, [ebp - 8]
push eax
push 3
lea eax, [ebp - 3]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp dword [ebp - 8], 3
jne 0x4065b4
lea eax, [ebp - 0x14]
lea edx, [ebp - 3]
mov ecx, 3
call fcn.0040323c
mov eax, dword [ebp - 0x14]
mov edx, 0x4065e4
call fcn.004033a0
jne 0x40659f
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xa]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
test byte [ebp - 0xa], 1
jne 0x406302
mov byte [0x408204], 0
test byte [ebp - 0xa], 2
jne 0x40630f
mov byte [0x408200], 0
mov al, byte [ebp - 0xa]
and al, 4
cmp al, 4
jne 0x40631f
mov byte [0x408208], 1
mov al, byte [ebp - 0xa]
and al, 0x18
sub al, 8
je 0x40632e
sub al, 8
je 0x40633a
jmp 0x406344
mov dword [0x40820c], 0x1f5
jmp 0x406344
mov dword [0x40820c], 0x1f6
mov al, byte [ebp - 0xa]
and al, 0x40
cmp al, 0x40
jne 0x406354
mov byte [0x408210], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xb]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp byte [ebp - 0xb], 0
jbe 0x40637a
mov byte [0x4081fc], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 9]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp byte [ebp - 9], 0
jbe 0x4063a0
mov byte [0x4081f8], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xa]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp byte [ebp - 0xa], 0
jbe 0x4063c6
mov byte [0x4081f4], 1
push 0
lea eax, [ebp - 8]
push eax
push 2
lea eax, [ebp - 0xe]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp word [ebp - 0xe], 0
jbe 0x4063ed
mov byte [0x408214], 1
push 0
lea eax, [ebp - 8]
push eax
push 1
lea eax, [ebp - 0xc]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
cmp byte [ebp - 0xc], 0
jbe 0x406413
mov byte [0x408218], 1
cmp byte [0x4081fc], 0
je 0x40643b
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xb]
push eax
mov eax, dword [0x409828]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
xor eax, eax
mov al, byte [ebp - 0xb]
mov edx, dword [0x409828]
mov byte [edx + eax], 0
cmp byte [0x4081f8], 0
je 0x4064ae
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 9]
push eax
mov eax, dword [0x409820]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
xor eax, eax
mov al, byte [ebp - 9]
mov edx, dword [0x409820]
mov byte [edx + eax], 0
lea eax, [ebp - 0x18]
mov edx, dword [0x409820]
call fcn.0040320c
mov eax, dword [ebp - 0x18]
mov edx, 0x4065f0
call fcn.004033a0
jne 0x4064ae
mov eax, dword [0x409820]
push eax
push 0x104
call sub.kernel32.dll_GetTempPathA
cmp byte [0x4081f4], 0
je 0x4064d6
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xa]
push eax
mov eax, dword [0x409824]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
xor eax, eax
mov al, byte [ebp - 0xa]
mov edx, dword [0x409824]
mov byte [edx + eax], 0
xor eax, eax
mov dword [0x40982c], eax
cmp byte [0x408214], 0
je 0x406530
movzx eax, word [ebp - 0xe]
inc eax
call fcn.00402458
mov dword [0x40982c], eax
push 0
lea eax, [ebp - 8]
push eax
movzx eax, word [ebp - 0xe]
push eax
mov eax, dword [0x40982c]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
movzx eax, word [ebp - 0xe]
mov edx, dword [0x40982c]
mov byte [edx + eax], 0
xor eax, eax
mov dword [0x409830], eax
cmp byte [0x408218], 0
je 0x40657e
xor eax, eax
mov al, byte [ebp - 0xc]
inc eax
call fcn.00402458
mov dword [0x409830], eax
push 0
lea eax, [ebp - 8]
push eax
xor eax, eax
mov al, byte [ebp - 0xc]
push eax
mov eax, dword [0x409830]
push eax
mov eax, dword [0x408224]
mov eax, dword [eax]
push eax
call sub.kernel32.dll_ReadFile
xor eax, eax
mov al, byte [ebp - 0xc]
mov edx, dword [0x409830]
mov byte [edx + eax], 0
push 0
push 0
mov eax, 1
call fcn.00403f84
add eax, 2
adc edx, 0
mov ecx, dword [0x408288]
mov dword [ecx], eax
mov dword [ecx + 4], edx
jmp 0x4065b4
mov eax, dword [0x408294]
movzx eax, word [eax]
xor edx, edx
mov ecx, dword [0x408288]
add dword [ecx], eax
adc dword [ecx + 4], edx
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4065d6
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.0040313c
ret