Function at 0x40cff0
Capabilities:
Check if file exists
Print debug messages
Read .ini file

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x46d750]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [0x46eaf4]
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi - 0xc]
xor edi, edi
cmp eax, edi
jl 0x40d033
push 0x45fc80
push esi
call fcn.0043a679
add esp, 8
cmp eax, edi
je 0x40d033
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40d09d
push str._ReadIni__Invalid_arguments__Missing_operator_____:
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 8]
call fcn.00401eb0
mov ebx, dword [eax]
add esp, 8
cmp ebx, edi
jne 0x40d052
mov dword [ebp - 8], edi
jmp 0x40d083
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40d068
mov dword [ebp - 8], edi
jmp 0x40d083
lea esi, [eax + eax]
mov eax, esi
call fcn.00440090
mov ecx, dword [ebp - 0xc]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00408150
mov dword [ebp - 8], eax
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 0x24]
call fcn.0043920e
push 0x467390
lea eax, [ebp - 0x24]
push eax
call fcn.0043b69a
cmp dword [esi - 0xc], edi
jge 0x40d0a7
or eax, 0xffffffff
jmp 0x40d0c2
push 0x45fc80
push esi
call fcn.0043a679
add esp, 8
cmp eax, edi
jne 0x40d0be
or eax, 0xffffffff
jmp 0x40d0c2
sub eax, esi
sar eax, 1
push eax
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 8]
call fcn.00407750
cmp dword [esi - 0xc], edi
jge 0x40d0d9
or eax, 0xffffffff
jmp 0x40d0f4
push 0x45fc80
push esi
call fcn.0043a679
add esp, 8
cmp eax, edi
jne 0x40d0f0
or eax, 0xffffffff
jmp 0x40d0f4
sub eax, esi
sar eax, 1
add eax, 2
lea ebx, [ebp + 8]
call fcn.004075c0
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x14], eax
call fcn.004020e0
add esp, 4
add eax, 0x10
push 0xa
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], eax
call fcn.00429689
mov eax, dword [ebp - 0x10]
lea edx, [ebp - 0x40]
push edx
push ecx
add eax, 0xfffffff0
mov dword [ebp - 8], esp
mov esi, esp
push eax
mov dword [ebp - 0x10], eax
call fcn.004020e0
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040b770
add esp, 8
cmp eax, 3
je 0x40d159
push str._ReadIni__Invalid_arguments__nArg_3_:
jmp 0x40d038
push edi
lea ecx, [ebp - 0x40]
call fcn.00429665
cmp eax, edi
jne 0x40d16b
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
add esp, 4
add eax, 0x10
push 1
lea ecx, [ebp - 0x40]
mov dword [ebp - 8], eax
call fcn.00429665
cmp eax, edi
jne 0x40d193
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
add esp, 4
mov edi, eax
push 2
lea ecx, [ebp - 0x40]
add edi, 0x10
call fcn.00429665
test eax, eax
jne 0x40d1ba
jmp fcn.004232a7
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.004020e0
mov ebx, eax
add esp, 4
add ebx, 0x10
call fcn.00423381
test eax, eax
jne 0x40d1e1
push 0x80004005
call fcn.00402160
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
mov ecx, dword [ebp - 8]
mov esi, eax
add esi, 0x10
push ecx
mov dword [ebp - 0xc], esi
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40d326
lea edx, [ebp - 0xc]
push str._ReadIni__Source_ini_file_not_found:
push edx
lea ecx, [ebp - 8]
call fcn.00401eb0
mov eax, dword [eax]
add esp, 8
push eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, dword [ebp - 0xc]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d240
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d25c
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d278
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [edi - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d294
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2b3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x40]
call fcn.004297c1
mov eax, dword [ebp - 0x18]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2da
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d2f6
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x14]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d312
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea esp, [ebp - 0x4c]
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00438dc7
mov esp, ebp
pop ebp
ret
mov edx, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub edx, 0x104
or ecx, edx
jge 0x40d34b
push 0x104
lea ecx, [ebp - 0xc]
call fcn.004021e0
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push eax
push 0x104
push esi
push 0x45f004
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test esi, esi
jne 0x40d36a
xor eax, eax
jmp 0x40d381
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d370
sub eax, edx
sar eax, 1
js 0x40d3ab
cmp eax, dword [esi - 8]
jg 0x40d3ab
mov edx, dword [ebp - 0x18]
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
mov ecx, dword [0x471c24]
push ecx
push esi
push edx
push 0x45f800
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40d240
push 0x80070057
call fcn.00402160
int3