Function at 0x40dba0
Capabilities:
Get common file path
Read .ini file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47c20f
mov eax, dword fs:[0]
push eax
sub esp, 0x434
mov eax, dword [0x4a5018]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x430], esi
mov dword [ebp - 0x43c], esi
mov dword [ebp - 0x440], esi
lea edi, [esi + 0x10]
mov dword [ebp - 0x43c], 0
mov dword [esi], vtable.CxLogger.0
mov dword [ebp - 0x424], edi
call fcn.00402880
mov ecx, eax
test ecx, ecx
je 0x40e117
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [edi], eax
push 0
lea eax, [esi + 0x14]
mov dword [ebp - 4], 0
xorps xmm0, xmm0
push 0
movups xmmword [eax], xmm0
push eax
movq qword [eax + 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionEx]
test eax, eax
jne 0x40dc53
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40dc4d
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x40e121
push 0x208
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 1
push 0
push eax
call fcn.004573c0
add esp, 0xc
lea eax, [ebp - 0x420]
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x420]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov esi, eax
call fcn.00402880
mov ecx, eax
test ecx, ecx
je 0x40e127
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x428], eax
push esi
lea ecx, [ebp - 0x428]
mov byte [ebp - 4], 2
call fcn.004067d0
test al, al
jne 0x40dcec
test esi, esi
jne 0x40dccb
xor ecx, ecx
jmp 0x40dcdf
mov ecx, esi
lea edx, [ecx + 2]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40dcd0
sub ecx, edx
sar ecx, 1
push ecx
push esi
lea ecx, [ebp - 0x428]
call fcn.004069d0
mov byte [ebp - 4], 3
call fcn.00402880
mov ecx, eax
test ecx, ecx
je 0x40e131
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x438], edi
mov byte [ebp - 4], 4
mov ecx, 1
mov eax, dword [edi - 8]
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40dd3d
push 0x104
lea ecx, [ebp - 0x438]
call fcn.00406b80
mov edi, dword [ebp - 0x438]
push 0x493db0
lea eax, [ebp - 0x420]
push eax
push edi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
push dword [edi - 8]
push edi
call fcn.0045d623
add esp, 8
test eax, eax
js 0x40e10d
cmp eax, dword [edi - 8]
jg 0x40e10d
mov esi, dword [ebp - 0x428]
xor ecx, ecx
push edi
push ecx
push 0x493dd4
mov dword [edi - 0xc], eax
push esi
mov word [edi + eax*2], cx
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push edi
push eax
push 0x493dd4
push 0x493ddc
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
mov dword [ebp - 0x434], eax
mov edx, 1
mov eax, dword [ebp - 0x424]
mov ecx, dword [eax]
mov dword [ebp - 0x42c], ecx
sub edx, dword [ecx - 4]
mov ecx, dword [ecx - 8]
sub ecx, 0x104
or ecx, edx
jge 0x40dddb
push 0x104
mov ecx, eax
call fcn.00406b80
mov eax, dword [ebp - 0x424]
mov eax, dword [eax]
jmp 0x40dde1
mov eax, dword [ebp - 0x42c]
push edi
push 0x104
push eax
push 0x492e10
push 0x493de0
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov esi, dword [ebp - 0x424]
mov eax, dword [esi]
test eax, eax
jne 0x40de09
xor ecx, ecx
jmp 0x40de1f
push dword [eax - 8]
push eax
call fcn.0045d623
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x40e10d
mov eax, dword [esi]
cmp ecx, dword [eax - 8]
jg 0x40e10d
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [esi]
mov word [eax + ecx*2], dx
call fcn.00402880
mov ecx, eax
test ecx, ecx
je 0x40e13b
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
lea esi, [eax + 0x10]
mov dword [ebp - 0x424], esi
mov byte [ebp - 4], 5
mov ecx, 1
mov eax, dword [esi - 8]
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
jge 0x40de82
push 0x104
lea ecx, [ebp - 0x424]
call fcn.00406b80
mov esi, dword [ebp - 0x424]
mov eax, dword [ebp - 0x428]
push edi
push 0x104
push esi
push eax
push str.LogDirName
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push dword [esi - 8]
push esi
call fcn.0045d623
add esp, 8
test eax, eax
js 0x40e10d
cmp eax, dword [esi - 8]
jg 0x40e10d
mov edx, dword [ebp - 0x434]
xor ecx, ecx
mov dword [esi - 0xc], eax
mov word [esi + eax*2], cx
mov eax, edx
mov ecx, dword [ebp - 0x430]
and eax, 2
and edx, 1
mov dword [ecx + 4], eax
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], 0
or ecx, 0xffffffff
test eax, eax
je 0x40e091
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.004573c0
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
push esi
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push eax
call esi
push str.Logs
lea eax, [ebp - 0x218]
push eax
call esi
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
mov byte [ebp - 4], 6
mov esi, dword [ebp - 0x428]
mov ecx, dword [esi - 0x10]
lea eax, [esi - 0x10]
mov dword [ebp - 0x434], eax
test ecx, ecx
je 0x40df6d
mov eax, dword [ecx]
mov eax, dword [eax + 0x10]
call eax
mov ecx, eax
test ecx, ecx
jne 0x40df85
call fcn.00402880
mov ecx, eax
mov edx, dword [eax]
mov eax, dword [edx + 0x10]
call eax
mov ecx, eax
test ecx, ecx
je 0x40e145
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
push 4
push str..log
push dword [esi - 0xc]
add eax, 0x10
mov dword [ebp - 0x43c], 1
mov edx, esi
mov dword [ebp - 0x42c], eax
lea ecx, [ebp - 0x42c]
call fcn.0040ebb0
mov esi, dword [ebp - 0x42c]
lea eax, [ebp - 0x218]
add esp, 0xc
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea edx, [esi - 0x10]
mov byte [ebp - 4], 5
or esi, 0xffffffff
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40dfeb
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
push 0
push 0x80
push 4
push 0
push 7
push 0x40000000
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ecx, eax
mov eax, dword [ebp - 0x430]
mov dword [eax + 0xc], ecx
cmp ecx, 0xffffffff
jne 0x40e07b
mov byte [ebp - 4], 4
mov edx, dword [ebp - 0x424]
mov dword [eax + 4], 0
add edx, 0xfffffff0
mov eax, esi
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x40e042
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov eax, esi
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40e05d
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x434]
mov byte [ebp - 4], 1
lock xadd dword [edx + 0xc], esi
dec esi
test esi, esi
jg 0x40e0ec
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x40e0ec
push 2
push 0
push 0
push ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [ebp - 0x424]
or ecx, 0xffffffff
mov byte [ebp - 4], 4
add esi, 0xfffffff0
mov eax, ecx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x40e0af
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov byte [ebp - 4], 3
add edi, 0xfffffff0
mov eax, ecx
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40e0cd
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
or ecx, 0xffffffff
mov byte [ebp - 4], 1
mov esi, dword [ebp - 0x428]
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ecx
dec ecx
test ecx, ecx
jg 0x40e0ec
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, dword [ebp - 0x430]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00454d47
mov esp, ebp
pop ebp
ret
push 0x80070057
call fcn.00402980
push 0x80004005
call fcn.00402980
push eax
call fcn.00402980
push 0x80004005
call fcn.00402980
push 0x80004005
call fcn.00402980
push 0x80004005
call fcn.00402980
push 0x80004005
call fcn.00402980
int3