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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x40
mov eax, dword [0x46e780]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call dword [0x46fb44]
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], eax
mov eax, dword [esi - 0xc]
xor edi, edi
cmp eax, edi
jl 0x40d423
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
je 0x40d423
sub eax, esi
sar eax, 1
cmp eax, 0xffffffff
jne 0x40d48d
push str._ReadIni__Invalid_arguments__Missing_operator_____:
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp + 8]
call fcn.004022b0
mov ebx, dword [eax]
add esp, 8
cmp ebx, edi
jne 0x40d442
mov dword [ebp - 8], edi
jmp 0x40d473
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
add eax, 1
cmp eax, 0x3fffffff
jle 0x40d458
mov dword [ebp - 8], edi
jmp 0x40d473
lea esi, [eax + eax]
mov eax, esi
call fcn.004411d0
mov ecx, dword [ebp - 0xc]
mov eax, esp
push ecx
push esi
push ebx
push eax
call fcn.00408520
mov dword [ebp - 8], eax
lea edx, [ebp - 8]
push edx
lea ecx, [ebp - 0x24]
call fcn.0043a782
push 0x468880
lea eax, [ebp - 0x24]
push eax
call fcn.0043e4e2
cmp dword [esi - 0xc], edi
jge 0x40d497
or eax, 0xffffffff
jmp 0x40d4b2
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
jne 0x40d4ae
or eax, 0xffffffff
jmp 0x40d4b2
sub eax, esi
sar eax, 1
push eax
lea ecx, [ebp - 0x10]
push ecx
lea ecx, [ebp + 8]
call fcn.004079f0
cmp dword [esi - 0xc], edi
jge 0x40d4c9
or eax, 0xffffffff
jmp 0x40d4e4
push 0x460f50
push esi
call fcn.0043a895
add esp, 8
cmp eax, edi
jne 0x40d4e0
or eax, 0xffffffff
jmp 0x40d4e4
sub eax, esi
sar eax, 1
add eax, 2
lea ebx, [ebp + 8]
call fcn.00407860
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
mov dword [ebp - 0x14], eax
call fcn.00402490
add esp, 4
add eax, 0x10
push 0xa
lea ecx, [ebp - 0x40]
mov dword [ebp - 0x18], eax
call fcn.00428c5c
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.00402490
add eax, 0x10
add esp, 4
mov dword [esi], eax
call fcn.0040bb40
add esp, 8
cmp eax, 3
je 0x40d549
push str._ReadIni__Invalid_arguments__nArg_3_:
jmp 0x40d428
push edi
lea ecx, [ebp - 0x40]
call fcn.00428c38
cmp eax, edi
jne 0x40d55b
jmp fcn.00423c33
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402490
add esp, 4
add eax, 0x10
push 1
lea ecx, [ebp - 0x40]
mov dword [ebp - 8], eax
call fcn.00428c38
cmp eax, edi
jne 0x40d583
jmp fcn.00423c33
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402490
add esp, 4
mov edi, eax
push 2
lea ecx, [ebp - 0x40]
add edi, 0x10
call fcn.00428c38
test eax, eax
jne 0x40d5aa
jmp fcn.00423c33
mov eax, dword [eax + 8]
sub eax, 0x10
push eax
call fcn.00402490
mov ebx, eax
add esp, 4
add ebx, 0x10
call fcn.00421a7e
test eax, eax
jne 0x40d5d1
push 0x80004005
call fcn.00401350
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 0x40d716
lea edx, [ebp - 0xc]
push str._ReadIni__Source_ini_file_not_found:
push edx
lea ecx, [ebp - 8]
call fcn.004022b0
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 0x40d630
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 0x40d64c
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 0x40d668
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 0x40d684
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 0x40d6a3
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea ecx, [ebp - 0x40]
call fcn.00428d94
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 0x40d6ca
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 0x40d6e6
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 0x40d702
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.00439e3e
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 0x40d73b
push 0x104
lea ecx, [ebp - 0xc]
call fcn.004013d0
mov esi, dword [ebp - 0xc]
mov eax, dword [ebp - 8]
push eax
push 0x104
push esi
push 0x4602d4
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
test esi, esi
jne 0x40d75a
xor eax, eax
jmp 0x40d771
mov eax, esi
lea edx, [eax + 2]
nop
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d760
sub eax, edx
sar eax, 1
js 0x40d79b
cmp eax, dword [esi - 8]
jg 0x40d79b
mov edx, dword [ebp - 0x18]
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
mov ecx, dword [0x472cac]
push ecx
push esi
push edx
push 0x460ad0
call dword [sym.imp.KERNEL32.dll_WritePrivateProfileStringW]
jmp 0x40d630
push 0x80070057
call fcn.00401350
int3