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

Disassembly:
sub esp, 0x330
mov eax, dword [0x4081d0]
mov dword [esp + 0x32c], eax
push 0x105
lea eax, [esp + 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x4014cf
push 0x105
lea ecx, [esp + 8]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
jne 0x4014e9
mov eax, 1
mov ecx, dword [esp + 0x32c]
call fcn.0040179e
add esp, 0x330
ret 0x10
lea edx, [esp + 4]
push 0x5c
push edx
call fcn.00401740
add esp, 8
test eax, eax
je 0x4014ff
mov byte [eax], 0
xor eax, eax
mov cl, byte [esp + eax + 0x224]
mov byte [esp + eax + 0x10c], cl
inc eax
test cl, cl
jne 0x401501
push edi
lea edi, [esp + 0x110]
dec edi
lea ecx, [ecx]
mov al, byte [edi + 1]
inc edi
test al, al
jne 0x401520
mov eax, dword [str.Flowol2.ini]
mov ecx, dword [0x406858]
mov edx, dword [0x40685c]
push esi
push 0
push 0
push 3
mov dword [edi], eax
mov al, byte [0x406860]
push 0
mov dword [edi + 4], ecx
push 0
push 0x80000000
lea ecx, [esp + 0x12c]
mov dword [edi + 8], edx
push ecx
mov byte [edi + 0xc], al
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x401584
push 0
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov edi, eax
test edi, edi
jne 0x4015a0
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop esi
mov eax, 1
pop edi
mov ecx, dword [esp + 0x32c]
call fcn.0040179e
add esp, 0x330
ret 0x10
lea edx, [edi + 1]
push ebp
push edx
call fcn.0040172e
mov ebp, eax
add esp, 4
test ebp, ebp
je 0x4015da
push 0
lea eax, [esp + 0x10]
push eax
push edi
push ebp
push esi
mov dword [esp + 0x20], 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp dword [esp + 0xc], edi
je 0x4015fe
push ebp
call fcn.00401729
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop ebp
pop esi
mov eax, 1
pop edi
mov ecx, dword [esp + 0x32c]
call fcn.0040179e
add esp, 0x330
ret 0x10
push ebx
push esi
mov byte [edi + ebp], 0
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp], 0
mov ebx, ebp
je 0x401630
push 8
push str._r_nMIMICS
push ebx
call fcn.004016f0
add esp, 0xc
test eax, eax
je 0x401630
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x401612
jmp 0x401697
cmp byte [ebx], 0
je 0x401697
mov al, byte [ebx + 8]
add ebx, 8
test al, al
je 0x401697
nop
cmp al, 0x3d
je 0x40164e
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x401640
jmp 0x401697
cmp byte [ebx], 0
je 0x401697
mov al, byte [ebx + 1]
inc ebx
test al, al
je 0x401697
jmp 0x401660
cmp al, 0x20
je 0x401668
cmp al, 9
jne 0x401672
mov al, byte [ebx + 1]
inc ebx
test al, al
jne 0x401660
jmp 0x401697
cmp byte [ebx], 0
je 0x401697
cmp byte [ebx], 0
mov eax, ebx
je 0x401694
mov edi, edi
mov cl, byte [eax]
cmp cl, 0xd
je 0x401694
cmp cl, 0xa
je 0x401694
mov cl, byte [eax + 1]
inc eax
test cl, cl
jne 0x401680
mov byte [eax], 0
mov esi, dword [esp + 0x34c]
mov edi, 0x406844
mov ecx, 3
xor edx, edx
repe cmpsb byte [esi], byte es:[edi]
jne 0x4016b9
push ebx
call fcn.00401430
add esp, 4
jmp 0x4016c7
lea eax, [esp + 0x14]
push eax
push ebx
call fcn.004013c0
add esp, 8
push ebp
call fcn.00401729
mov ecx, dword [esp + 0x340]
add esp, 4
pop ebx
pop ebp
pop esi
xor eax, eax
pop edi
call fcn.0040179e
add esp, 0x330
ret 0x10