Function at 0x40f470
Capabilities:
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x592d5e
mov eax, dword fs:[0]
push eax
sub esp, 0x154
mov eax, dword [0x604654]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
mov edi, dword [ebp + 0x10]
mov ebx, dword [ebp + 0x14]
mov dword [ebp - 0x148], eax
mov eax, dword [ebp + 0xc]
push 0x80
mov dword [ebp - 0x140], eax
lea eax, [ebp - 0x90]
push 0
push eax
mov dword [ebp - 0x144], 0
mov byte [ebp - 0x139], 0
call fcn.0053c7b0
add esp, 0xc
lea eax, [ebp - 0x90]
push dword [esi]
push 0x3f
push eax
push edi
push dword [ebp - 0x140]
push ebx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
cmp word [ebp - 0x90], 0
je 0x40f6ac
push 0xa8
lea eax, [ebp - 0x138]
push 0
push eax
call fcn.0053c7b0
add esp, 0xc
mov dword [ebp - 0x150], 0
xor eax, eax
mov dword [ebp - 0x14c], 7
lea ecx, [ebp - 0x90]
mov word [ebp - 0x160], ax
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40f542
sub ecx, edx
lea eax, [ebp - 0x90]
sar ecx, 1
push ecx
push eax
lea ecx, [ebp - 0x160]
call fcn.00413b10
mov dword [ebp - 4], 0
mov dword [ebp - 0x138], 0x5ab394
mov dword [ebp - 0xd8], vtable.std::basic_ios_wchar_t__struct_std::char_traits_wchar_t__.0
push 0
push 0
lea eax, [ebp - 0x128]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x138]
mov dword [ebp - 0x144], 1
call fcn.00410270
mov eax, dword [ebp - 0x138]
mov dword [ebp - 4], 2
mov eax, dword [eax + 4]
mov dword [ebp + eax - method.std::basic_istringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_istringstream_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
mov eax, dword [ebp - 0x138]
mov ecx, dword [eax + 4]
lea eax, [ecx - 0x60]
mov dword [ebp + ecx - 0x13c], eax
lea eax, [ebp - 0x128]
mov ecx, eax
mov dword [ebp - 0x140], eax
call fcn.00410420
cmp dword [ebp - 0x14c], 8
lea ebx, [ebp - 0x160]
mov edi, dword [ebp - 0x150]
mov eax, 2
cmovae ebx, dword [ebp - 0x160]
mov byte [ebp - 4], 3
mov dword [ebp - method.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.virtual_0], vtable.std::basic_stringbuf_wchar_t__struct_std::char_traits_wchar_t___class_std::allocator_wchar_t__.0
cmp edi, 0x7fffffff
ja 0x40f6d0
test edi, edi
je 0x40f666
push edi
lea ecx, [ebp - 0xe8]
call fcn.0040ecd0
add edi, edi
mov esi, eax
push edi
push ebx
push esi
call fcn.0053bcb0
lea eax, [edi + esi]
add esp, 0xc
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0x11c]
sar edi, 1
mov dword [eax], esi
mov eax, dword [ebp - 0x10c]
mov dword [eax], esi
mov eax, dword [ebp - 0xfc]
mov dword [eax], edi
mov eax, 3
jmp 0x40f670
mov dword [ebp - 0xf0], 0
mov dword [ebp - 0xec], eax
lea ecx, [ebp - 0x160]
mov byte [ebp - 4], 5
call fcn.0040c130
push dword [ebp - 0x148]
lea eax, [ebp - 0x138]
push eax
call fcn.0040ee70
add esp, 8
mov byte [ebp - 0x139], 1
lea ecx, [ebp - 0x138]
call fcn.00411690
mov al, byte [ebp - 0x139]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004a408b
mov esp, ebp
pop ebp
ret 0x10
call fcn.0047e644
int3