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

Disassembly:
push 0xffffffffffffffff
push 0x42694c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x12c
push ebx
push ebp
push esi
push edi
mov ebp, ecx
push 0
push 0
mov dword [esp + 0x3c], ebp
call fcn.00402200
mov eax, dword [ebp + 8]
push 0
push eax
mov ecx, ebp
mov dword [esp + 0x14c], 0
mov dword [ebp], 0x42826c
call fcn.00402c70
xor ecx, ecx
xor esi, esi
mov edi, eax
lea esi, [ebp + 0x14]
push 0xffffffffffffffff
push ecx
mov ecx, esi
mov dword [esp + 0x14c], 1
call fcn.00402390
mov dword [esi], 0x428230
lea ecx, [esp + 0x38]
mov byte [esp + 0x144], 2
push ecx
push 0x104
mov dword [ebp], 0x4283c0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
mov edx, dword [0x432f70]
push 0
mov ecx, 0x432f70
call dword [edx + 4]
lea eax, [esp + 0x38]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x18]
call fcn.004024c0
lea ecx, [esp + 0x10]
mov byte [esp + 0x144], 3
push ecx
mov ecx, 0x432f70
call fcn.0040a020
lea edx, [esp + 0x24]
push 1
push edx
mov ecx, 0x432f70
mov byte [esp + 0x14c], 2
call fcn.0040a1e0
push 0x42f618
mov ecx, eax
mov byte [esp + 0x148], 4
call fcn.00404710
test eax, eax
lea ecx, [esp + 0x24]
mov byte [esp + 0x144], 2
setne bl
call fcn.00402270
test bl, bl
je 0x40819d
push 0xffffffffffffffff
push 0x42f618
lea ecx, [esp + 0x18]
call fcn.004024c0
lea eax, [esp + 0x10]
mov ecx, 0x432f70
push eax
mov byte [esp + 0x148], 5
call fcn.0040a020
mov byte [esp + 0x144], 2
lea ecx, [esp + 0x38]
push 0x104
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edx, dword [esi]
push 0
mov ecx, esi
call dword [edx + 4]
lea eax, [esp + 0x38]
push 0xffffffffffffffff
push eax
lea ecx, [esp + 0x18]
call fcn.004024c0
lea ecx, [esp + 0x10]
mov byte [esp + 0x144], 6
push ecx
mov ecx, esi
call fcn.0040a020
mov eax, dword [esi + 8]
mov byte [esp + 0x144], 2
dec eax
js 0x4081f6
mov ecx, dword [esi + 4]
cmp byte [ecx + eax], 0x5c
je 0x4081f9
dec eax
jns 0x4081ed
or eax, 0xffffffff
inc eax
lea edx, [esp + 0x24]
push eax
push edx
mov ecx, esi
call fcn.004025a0
mov esi, eax
mov eax, dword [0x432f60]
push 0
mov ecx, 0x432f60
mov byte [esp + 0x148], 7
call dword [eax + 4]
push esi
mov ecx, 0x432f60
call fcn.0040a020
lea ecx, [esp + 0x24]
mov byte [esp + 0x144], 2
call fcn.00402270
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x10]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov dword [esp + 0x10], str..cfg
mov ebx, ecx
lea ecx, [esp + 0x38]
sub ecx, 4
mov dword [esp + 0x14], str..config
add ebx, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x20]
or ecx, 0xffffffff
mov edi, dword [eax]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
lea eax, [esp + 0x38]
mov edx, ecx
mov esi, edi
mov edi, ebx
push eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call fcn.00418550
add esp, 4
test eax, eax
je 0x4082c9
push 0
push 0x80
push 3
push 0
push 3
lea ecx, [esp + 0x4c]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x4082e4
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x20]
inc eax
add edx, 4
cmp eax, 2
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], edx
jb 0x408271
jmp 0x408319
mov edi, dword [sym.imp.KERNEL32.dll_GetFileSize]
push 0
push esi
call edi
mov edx, dword [ebp + 8]
push eax
push edx
mov ecx, ebp
call fcn.00402c70
mov ebx, eax
lea eax, [esp + 0x1c]
push 0
push eax
push 0
push esi
call edi
push eax
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp + 8]
test eax, eax
jle 0x408334
push 2
push eax
mov ecx, ebp
call fcn.00402c70
mov cx, word [0x42f604]
mov word [eax], cx
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x24]
mov dword [ebp + 0x10], edx
call fcn.0040a570
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 8
call fcn.004083e0
mov dword [esp + 0x10], 0x428274
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
push eax
push ecx
mov ecx, ebp
mov byte [esp + 0x14c], 9
call fcn.00402b30
mov dword [esp + 0x10], 0x428238
mov dword [esp + 0x24], 0x428228
lea ecx, [esp + 0x24]
mov byte [esp + 0x144], 0xa
call fcn.00402380
test eax, eax
je 0x4083a4
push eax
call fcn.0040cb32
add esp, 4
mov ecx, dword [esp + 0x13c]
pop edi
mov eax, ebp
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x138
ret