Function at 0x4040a0
Capabilities:
Get common file path
Get file attributes
Read .ini file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x150
push ebx
push esi
push edi
mov dword [ebp - 0x10c], 0
mov dword [ebp - 0xbc], 0x3ec4e
mov esi, dword [ebp - 0x10c]
add esi, 0x32c23
movzx eax, word [ebp - 0xac]
sub eax, dword [ebp - 0x10c]
and esi, eax
movzx ecx, byte [ebp - 0x81]
mov edx, 0x31ab6
sub edx, ecx
add edx, 0x140f
or esi, edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetMailslotInfo]
and eax, 0x210b1
and eax, 0x36a6
or esi, eax
mov dword [ebp - 0x10c], esi
movzx eax, byte [ebp - 0x81]
mov ecx, 0x1c5a6
sub ecx, eax
add ecx, dword [ebp - 0x10c]
movzx edx, word [ebp - 0xac]
add ecx, edx
sub ecx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
add eax, 0x50461
and ecx, eax
and ecx, 0x1a2be
or ecx, 0x5e88a
xor edx, edx
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x6c], edx
movzx eax, word [ebp - 0xac]
mov ecx, dword [ebp - 0x10c]
lea edx, [ecx + eax - 0x43a80]
sub edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
and eax, 0x48603
and eax, dword [ebp - 0x10c]
or edx, eax
mov word [ebp - 0xac], dx
mov ecx, 0x28b9
mov word [ebp - 0xac], cx
push 0
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
test eax, eax
je 0x4041d4
movzx edx, word [ebp - 0xac]
cmp edx, 0x23109
jne 0x4041ba
mov eax, dword [ebp - 0x10c]
cmp eax, dword [ebp - 0x10c]
je 0x4041d4
mov ecx, dword [ebp - 0x10c]
cmp ecx, dword [ebp - 0x10c]
je 0x4041d4
cmp dword [ebp - 0x10c], 0x1aaa8
jne 0x404221
mov edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
lea esi, [eax + edx + 0x7dbb3]
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateFileMappingW]
sub esi, eax
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ReadFile]
add esi, eax
and esi, 0x11fe4
or esi, 0x243bc
mov dword [ebp - 0x10c], esi
jmp 0x404251
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasA]
and eax, dword [ebp - 0x10c]
movzx ecx, word [ebp - 0xac]
mov edx, dword [ebp - 0x10c]
lea ecx, [edx + ecx - 0x73cf7]
or eax, ecx
mov dword [ebp - 0x10c], eax
cmp dword [ebp - 0x70], 0x54e83
jne 0x4042bd
cmp dword [ebp - 0x6c], 0
jne 0x4042bd
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateIoCompletionPort]
mov esi, eax
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetProcessWorkingSetSize]
cmp esi, eax
jne 0x4042bd
movzx edx, word [ebp - 0xac]
mov eax, dword [ebp - 0x10c]
lea ecx, [edx + eax - 0x56688]
sub ecx, dword [ebp - 0x10c]
and ecx, 0xfffac9b2
or ecx, dword [ebp - 0x10c]
xor edx, edx
or ecx, dword [ebp - 0x70]
or edx, dword [ebp - 0x6c]
or ecx, 0x38e63
mov word [ebp - 0xac], cx
jmp 0x4042f8
mov esi, dword [ebp - 0x10c]
sub esi, 0x4b905
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileSectionW]
mov edx, dword [ebp - 0x10c]
mov ecx, eax
shr edx, cl
and esi, edx
and esi, dword [ebp - 0x10c]
movzx eax, word [ebp - 0xac]
and esi, eax
mov dword [ebp - 0x10c], esi
mov ecx, dword [ebp - 0x10c]
xor edx, edx
mov eax, dword [ebp - 0x10c]
sub eax, dword [ebp - 0x10c]
and eax, dword [ebp - 0x10c]
xor esi, esi
and eax, dword [ebp - 0x70]
and esi, dword [ebp - 0x6c]
or ecx, eax
or edx, esi
mov dword [ebp - 0x70], ecx
mov dword [ebp - 0x6c], edx
movzx ecx, word [ebp - 0xac]
sub ecx, 0x4c1a6
mov edx, dword [ebp - 0x10c]
mov eax, dword [ebp - 0x10c]
lea edx, [eax + edx + 0x71f81]
sub edx, dword [ebp - 0x10c]
or ecx, edx
mov esi, ecx
xor edi, edi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetThreadContext]
xor ecx, ecx
mov edx, dword [ebp - 0x70]
sub edx, eax
mov eax, dword [ebp - 0x6c]
sbb eax, ecx
or esi, edx
or edi, eax
movzx ecx, byte [ebp - 0x81]
add ecx, dword [ebp - 0x10c]
and ecx, 0x64ac0
xor ecx, 0x4d811
xor edx, edx
or esi, ecx
or edi, edx
mov dword [ebp - 0x10c], esi
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetComputerNameExA]
cmp eax, dword [ebp - 0x10c]
je 0x4043ad
cmp dword [ebp - 0x10c], 0x13c4b
jne 0x4043e2
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ProcessIdToSessionId]
mov esi, eax
add esi, 0x73e5d
push 0
push 0
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrencyFormatA]
sub esi, eax
or esi, dword [ebp - 0x10c]
mov word [ebp - 0xac], si
jmp 0x4043f9
mov eax, dword [ebp - 0x10c]
add eax, 0x173ef
or eax, dword [ebp - 0x10c]
mov dword [ebp - 0x10c], eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, eax
movzx ecx, byte [ebp - 0x81]
add esi, ecx
sub esi, dword [ebp - 0x10c]
movzx edx, byte [ebp - 0x81]
sub edx, dword [ebp - 0x10c]
sub edx, 0x7b53d
or esi, edx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
sub eax, dword [ebp - 0x10c]
add eax, 0x6437e
and eax, dword [ebp - 0x10c]
or esi, eax
mov dword [ebp - 0x10c], esi
mov eax, dword [ebp - 0x10c]
xor ecx, ecx
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x14c], ecx
mov edx, dword [ebp - 0x6c]
cmp edx, dword [ebp - 0x14c]
ja 0x4044e3
jb 0x40447a
mov eax, dword [ebp - 0x70]
cmp eax, dword [ebp - 0x150]
ja 0x4044e3
mov esi, 0xe0ed
sub esi, dword [ebp - 0x10c]
movzx ecx, word [ebp - 0xac]
add esi, ecx
sub esi, dword [ebp - 0x10c]
sub esi, 0x3934c
mov edi, dword [ebp - 0x10c]
sub edi, 0xd74d
movzx edx, word [ebp - 0xac]
sub edi, edx
movzx eax, word [ebp - 0xac]
sub edi, eax
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ResetWriteWatch]
add edi, eax
movzx ecx, byte [ebp - 0x81]
sub edi, ecx
sub edi, 0x11c21
and esi, edi
or esi, 0x53f
mov dword [ebp - 0x10c], esi
jmp 0x404538
movzx edx, word [ebp - 0xac]
mov eax, dword [ebp - 0x10c]
lea ebx, [eax + edx + 0x2dd7a]
and ebx, 0x35888
movzx ecx, word [ebp - 0xac]
add ecx, dword [ebp - 0x10c]
mov edx, dword [ebp - 0x10c]
lea esi, [edx + ecx + 0x48fdf]
add esi, dword [ebp - 0x10c]
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
add esi, dword [ebp - 0x10c]
lea eax, [eax + esi - 0x3c8f3]
or ebx, eax
mov byte [ebp - 0x81], bl
mov eax, dword [ebp - 0x10c]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18