Function at 0x40cf10
Capabilities:
Check if file exists
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4a467c
mov eax, dword fs:[0]
push eax
sub esp, 0x2dc
mov eax, dword [0x4c9614]
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
call fcn.0040ce50
mov esi, 0x11c
push esi
xor ebx, ebx
push ebx
push 0x4d0388
call fcn.004845b0
add esp, 0xc
mov edi, 0x4d0388
mov dword [0x4d0388], esi
call fcn.0040c8c0
test eax, eax
jne 0x40cf7e
push esi
push ebx
push edi
call fcn.004845b0
add esp, 0xc
mov dword [0x4d0388], esi
push ebx
push 0x4aa7ac
push 0x4d04a4
call fcn.00403ad0
push ebx
push 0x4aa7ac
push 0x4d04ac
call fcn.00403ad0
push ebx
push 0x4aa7ac
push 0x4d04b0
call fcn.00403ad0
push ebx
push 0x4aa7ac
push 0x4d04b8
call fcn.00403ad0
push 1
push 0x4ab020
push 0x4d04bc
call fcn.00403ad0
push ebx
push 0x4aa7ac
push 0x4d04b4
call fcn.00403ad0
lea eax, [ebp - 0x2e8]
push eax
mov ecx, 0x4cfd70
call fcn.00403ba0
push 0xc
push str.360base.dll
lea edi, [ebp - 0x2e8]
mov dword [ebp - 4], ebx
call fcn.0040bd30
lea ecx, [ebp - 0x2e4]
push ecx
mov ecx, 0x4cfd70
call fcn.00403ba0
mov eax, edi
mov edi, 0x4d0c60
mov byte [ebp - 4], 1
call fcn.00409700
lea eax, [ebp - 0x2e4]
mov edi, 0x4d1224
call fcn.00409700
call fcn.0040a900
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
call fcn.00469050
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x2e4]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40d06b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [0x4d04c8], 1
jne 0x40d0d1
push 0xc6
lea edx, [ebp - 0xd6]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0xd8], cx
call fcn.004845b0
add esp, 0xc
push 0x64
lea eax, [ebp - 0xd8]
push eax
call fcn.0049b880
test eax, eax
je 0x40d0d1
lea eax, [ebp - 0xd8]
lea edx, [eax + 2]
lea ecx, [ecx]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40d0b0
sub eax, edx
sar eax, 1
push eax
lea ecx, [ebp - 0xd8]
push ecx
push 0x4d04a4
call fcn.00403ad0
mov ecx, 0x4d04a8
call fcn.004693b0
push 0x206
lea eax, [ebp - 0x2de]
xor edx, edx
push ebx
push eax
mov word [ebp - 0x2e0], dx
call fcn.004845b0
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
add esp, 0xc
push 0x4aa924
push 0x4cfd70
lea ecx, [ebp - 0x2e0]
push ecx
call esi
lea edx, [ebp - 0x2e4]
push edx
lea ecx, [ebp - 0x2e0]
call fcn.0040aa60
add esp, 4
mov edi, 0x4d04ac
mov byte [ebp - 4], 2
call fcn.00409700
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x2e4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d15a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea edx, [ebp - 0x2e0]
lea ecx, [ebp - 0x2e4]
call fcn.0040c9a0
mov edi, 0x4d04c0
mov byte [ebp - 4], 3
call fcn.00409700
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x2e4]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d19e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push 0x206
lea edx, [ebp - 0x2de]
xor ecx, ecx
push ebx
push edx
mov word [ebp - 0x2e0], cx
call fcn.004845b0
add esp, 0xc
push str.config.ini
push 0x4cfd70
lea eax, [ebp - 0x2e0]
push eax
call esi
lea ecx, [ebp - 0x2e0]
push ecx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
je 0x40d395
mov ecx, dword [0x4d04b0]
mov eax, dword [ecx - 8]
mov edx, 1
sub edx, dword [ecx - 4]
sub eax, 0x3e8
or eax, edx
jge 0x40d213
mov ecx, 0x3e8
mov eax, 0x4d04b0
call fcn.00403a80
mov ecx, dword [0x4d04b0]
mov esi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea edx, [ebp - 0x2e0]
push edx
push 0x3e8
push ecx
push 0x4aaa44
push str.language
push 0x4aa97c
call esi
mov eax, dword [0x4d04b0]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0047f161
mov ecx, dword [0x4d04b0]
mov dword [ecx - 0xc], eax
mov ecx, dword [0x4d04b0]
xor edx, edx
mov word [ecx + eax*2], dx
mov edx, dword [0x4d04b8]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x3e8
add esp, 8
or eax, ecx
jge 0x40d28d
mov ecx, 0x3e8
mov eax, 0x4d04b8
call fcn.00403a80
mov edx, dword [0x4d04b8]
lea eax, [ebp - 0x2e0]
push eax
push 0x3e8
push edx
push 0x4aa7ac
push str.channel
push 0x4aa97c
call esi
mov eax, dword [0x4d04b8]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0047f161
mov ecx, dword [0x4d04b8]
mov dword [ecx - 0xc], eax
mov ecx, dword [0x4d04b8]
xor edx, edx
mov word [ecx + eax*2], dx
mov edx, dword [0x4d04bc]
mov eax, dword [edx - 8]
mov ecx, 1
sub ecx, dword [edx - 4]
sub eax, 0x3e8
add esp, 8
or eax, ecx
jge 0x40d301
mov ecx, 0x3e8
mov eax, 0x4d04bc
call fcn.00403a80
mov edx, dword [0x4d04bc]
lea eax, [ebp - 0x2e0]
push eax
push 0x3e8
push edx
push 0x4aa7ac
push str.schannel
push 0x4aa97c
call esi
mov eax, dword [0x4d04bc]
mov ecx, dword [eax - 8]
push ecx
push eax
call fcn.0047f161
mov ecx, dword [0x4d04bc]
mov dword [ecx - 0xc], eax
mov ecx, dword [0x4d04bc]
xor edx, edx
mov word [ecx + eax*2], dx
mov eax, dword [0x4d04bc]
add esp, 8
cmp dword [eax - 0xc], ebx
je 0x40d384
mov ecx, 0x4ab01c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d37b
cmp dx, bx
je 0x40d377
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d37b
add eax, 4
add ecx, 4
cmp dx, bx
jne 0x40d355
xor eax, eax
jmp 0x40d380
sbb eax, eax
sbb eax, 0xffffffff
cmp eax, ebx
jne 0x40d395
push 1
push 0x4ab020
push 0x4d04bc
call fcn.00403ad0
push 0x1e
call dword [sym.imp.SHLWAPI.dll_IsOS]
test eax, eax
mov eax, 0x4aaff0
jne 0x40d3ab
mov eax, 0x4aaff8
mov edx, dword [0x4d0390]
push eax
mov eax, dword [0x4d038c]
push edx
push eax
push str._d._d__s
mov edi, 0x4d04b4
call fcn.00406c20
add esp, 0x10
call fcn.00402d80
mov esi, eax
cmp byte [esi + 0x270], bl
jne 0x40d3df
call fcn.00402a30
cmp dword [esi], ebx
je 0x40d3fa
mov esi, dword [esi + 0x230]
cmp esi, ebx
je 0x40d3fa
push ebx
push 0x4d0624
call esi
add esp, 8
jmp 0x40d3fc
xor eax, eax
push 0x4d1224
mov ecx, 0x4d04d0
mov dword [0x4d04cc], eax
call fcn.00469b40
push 0x4d04bc
push 0x4d04b8
push 0x4d04b4
push 0x4d04b0
push 0x4d04ac
mov eax, 0x4d04a4
call fcn.00468930
push 0x4d1224
mov ecx, 0x4d10d0
call fcn.00469b40
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x2e8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40d46b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0047e6eb
mov esp, ebp
pop ebp
ret