Function at 0x40bef0
Capabilities:
Read .ini file

Disassembly:
push 0xffffffffffffffff
push 0x4106dc
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x21c
mov eax, dword [esp + 0x230]
push ebx
push ebp
push esi
push edi
mov edi, ecx
push eax
lea ecx, [esp + 0x30]
xor esi, esi
push 0x415040
push ecx
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], esi
call dword [sym.imp.MSVCRT.dll_sprintf]
push 0xc
call sub.MFC42.DLL_operatornew
add esp, 0x10
mov dword [esp + 0x18], eax
cmp eax, esi
mov dword [esp + 0x234], 1
je 0x40bf60
push 0x415ae8
mov ecx, eax
call fcn.0040cfe0
mov ebp, eax
jmp 0x40bf62
xor ebp, ebp
cmp ebp, esi
mov byte [esp + 0x234], 0
mov dword [esp + 0x14], ebp
jne 0x40bf7c
push 0x8007000e
call fcn.0040ecf2
push 0xc
mov dword [esp + 0x238], 2
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, esi
mov byte [esp + 0x234], 3
je 0x40bfaf
push str._ResourceString
mov ecx, eax
call fcn.0040cfe0
jmp 0x40bfb1
xor eax, eax
cmp eax, esi
mov byte [esp + 0x234], 2
mov dword [esp + 0x18], eax
jne 0x40bfcb
push 0x8007000e
call fcn.0040ecf2
lea edx, [esp + 0x18]
lea eax, [esp + 0x1c]
push edx
push eax
lea ecx, [edi + 8]
mov byte [esp + 0x23c], 4
call fcn.0040ce00
mov bl, 6
lea ecx, [esp + 0x18]
mov byte [esp + 0x234], bl
call fcn.0040cf90
push 0xc
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x10], eax
cmp eax, esi
mov byte [esp + 0x234], 7
je 0x40c025
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
call fcn.0040cfe0
mov esi, eax
mov dword [esp + 0x10], esi
jmp 0x40c029
mov dword [esp + 0x10], esi
test esi, esi
mov byte [esp + 0x234], bl
mov dword [esp + 0x28], esi
jne 0x40c042
push 0x8007000e
call fcn.0040ecf2
mov eax, dword [edi + 0xc]
mov bl, 8
test eax, eax
mov byte [esp + 0x234], bl
jne 0x40c0fc
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x40c066
call fcn.0040ba80
mov edi, eax
jmp 0x40c068
xor edi, edi
test esi, esi
je 0x40c077
mov ecx, esi
call fcn.0040ba80
mov esi, eax
jmp 0x40c079
xor esi, esi
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x40c088
call fcn.0040ba80
jmp 0x40c08a
xor eax, eax
push edi
lea edx, [esp + 0x130]
push 0x100
push edx
push 0x415ae8
push esi
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringA]
test ebp, ebp
je 0x40c0b8
mov ecx, ebp
call fcn.00404550
mov dword [esp + 0x14], 0
push 0xc
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
mov byte [esp + 0x234], 9
je 0x40c0e3
lea ecx, [esp + 0x12c]
push ecx
mov ecx, eax
call fcn.0040cfe0
jmp 0x40c0e5
xor eax, eax
mov edi, dword [esp + 0x20]
mov esi, dword [esp + 0x10]
mov ebp, eax
mov byte [esp + 0x234], bl
mov dword [esp + 0x14], ebp
jmp 0x40c100
mov ebp, dword [esp + 0x14]
test ebp, ebp
je 0x40c121
mov eax, dword [ebp]
test eax, eax
je 0x40c121
push eax
call dword [sym.imp.OLEAUT32.dll_VariantInit]
test eax, eax
je 0x40c121
mov eax, dword [edi + 0xc]
test eax, eax
je 0x40c1ec
mov eax, dword [esp + 0x240]
mov ecx, dword [0x415a18]
lea edx, [esp + 0x2c]
push 0x100
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_LoadStringA]
xor esi, esi
mov edi, eax
cmp ebp, esi
je 0x40c153
mov ecx, ebp
call fcn.00404550
mov dword [esp + 0x14], esi
push 0xc
call sub.MFC42.DLL_operatornew
add esp, 4
mov dword [esp + 0x18], eax
cmp eax, esi
mov byte [esp + 0x234], 0xa
je 0x40c17b
lea edx, [esp + 0x2c]
mov ecx, eax
push edx
call fcn.0040cfe0
mov esi, eax
mov eax, dword [esp + 0x20]
mov ebp, esi
mov byte [esp + 0x234], bl
mov dword [esp + 0x14], ebp
mov ecx, dword [eax + 0xc]
test ecx, ecx
je 0x40c197
test edi, edi
je 0x40c1e8
mov ecx, dword [eax + 4]
test ecx, ecx
je 0x40c1a7
call fcn.0040ba80
mov ebx, eax
jmp 0x40c1a9
xor ebx, ebx
test esi, esi
je 0x40c1b8
mov ecx, esi
call fcn.0040ba80
mov edi, eax
jmp 0x40c1ba
xor edi, edi
mov ecx, dword [esp + 0x10]
test ecx, ecx
je 0x40c1cb
call fcn.0040ba80
mov esi, eax
jmp 0x40c1cd
xor esi, esi
mov ecx, dword [esp + 0x1c]
test ecx, ecx
je 0x40c1dc
call fcn.0040ba80
jmp 0x40c1de
xor eax, eax
push ebx
push edi
push esi
push eax
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringA]
mov esi, dword [esp + 0x10]
mov ebx, dword [esp + 0x23c]
test ebp, ebp
mov dword [ebx], ebp
je 0x40c203
lea eax, [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov dword [esp + 0x24], 1
test esi, esi
je 0x40c216
mov ecx, esi
call fcn.00404550
mov eax, dword [esp + 0x1c]
mov edi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
mov byte [esp + 0x234], 2
je 0x40c24d
mov esi, eax
add eax, 8
push eax
call edi
test eax, eax
jne 0x40c245
test esi, esi
je 0x40c245
push 1
mov ecx, esi
call fcn.004045a0
mov dword [esp + 0x1c], 0
test ebp, ebp
mov byte [esp + 0x234], 0
je 0x40c26c
lea ecx, [ebp + 8]
push ecx
call edi
test eax, eax
jne 0x40c26c
push 1
mov ecx, ebp
call fcn.004045a0
mov ecx, dword [esp + 0x22c]
pop edi
pop esi
mov eax, ebx
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x228
ret 8