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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x538d6f
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x58d984]
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
mov ebx, ecx
mov dword [ebp - 0x438], ebx
mov dword [ebp - 0x440], ebx
mov dword [ebp - 0x44c], ebx
mov dword [ebp - 0x444], 0
mov dword [ebx], vtable.CxLogger.0
mov dword [ebp - 4], 0
call fcn.004048c0
mov ecx, eax
test ecx, ecx
je 0x403e4d
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebx + 0x10], eax
lea eax, [ebx + 0x14]
mov dword [ebp - 4], 1
xor ecx, ecx
mov dword [eax], ecx
mov dword [eax + 4], ecx
mov dword [eax + 8], ecx
mov dword [eax + 0xc], ecx
push ecx
mov dword [eax + 0x10], ecx
push eax
mov dword [eax + 0x14], ecx
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSectionAndSpinCount]
test eax, eax
jne 0x403996
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x403990
movzx eax, ax
or eax, 0x80070000
test eax, eax
js 0x403e57
push 0x208
lea eax, [ebp - 0x420]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.0050ce60
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]
push eax
lea ecx, [ebp - 0x424]
call fcn.004036d0
mov byte [ebp - 4], 4
call fcn.004048c0
mov ecx, eax
test ecx, ecx
je 0x403e5d
mov eax, dword [ecx]
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [ebp - 0x42c], esi
mov eax, dword [esi - 8]
mov ecx, 1
sub ecx, dword [esi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 5
jge 0x403a2c
push 0x104
lea ecx, [ebp - 0x42c]
call fcn.00404ae0
mov esi, dword [ebp - 0x42c]
push 0x545740
lea eax, [ebp - 0x420]
push eax
push esi
call dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea edi, [esi - 0x10]
mov dword [ebp - 0x43c], edi
test esi, esi
jne 0x403a50
xor eax, eax
jmp 0x403a64
push dword [edi + 8]
push esi
call fcn.00513bd0
add esp, 8
test eax, eax
js 0x403e7b
cmp eax, dword [edi + 8]
jg 0x403e7b
push esi
xor ecx, ecx
mov dword [edi + 4], eax
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileIntW]
push ecx
push 0x545764
mov word [esi + eax*2], cx
push dword [ebp - 0x424]
call edi
push esi
push eax
push 0x545764
push 0x54576c
call edi
mov edx, dword [ebx + 0x10]
mov ecx, 1
mov dword [ebp - 0x428], eax
mov eax, dword [edx - 8]
sub ecx, dword [edx - 4]
sub eax, 0x104
or eax, ecx
jge 0x403ac6
push 0x104
lea ecx, [ebx + 0x10]
call fcn.00404ae0
mov edx, dword [ebx + 0x10]
push esi
push 0x104
push edx
push 0x544c1c
push 0x545770
push dword [ebp - 0x424]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov eax, dword [ebx + 0x10]
test eax, eax
jne 0x403aee
xor ecx, ecx
jmp 0x403b04
push dword [eax - 8]
push eax
call fcn.00513bd0
mov ecx, eax
add esp, 8
test ecx, ecx
js 0x403e7b
mov eax, dword [ebx + 0x10]
cmp ecx, dword [eax - 8]
jg 0x403e7b
mov dword [eax - 0xc], ecx
xor edx, edx
mov eax, dword [ebx + 0x10]
mov word [eax + ecx*2], dx
mov byte [ebp - 4], 6
call fcn.004048c0
mov ecx, eax
test ecx, ecx
je 0x403e67
mov eax, dword [ecx]
call dword [eax + 0xc]
lea edi, [eax + 0x10]
mov dword [ebp - 0x430], edi
mov eax, dword [edi - 8]
mov ecx, 1
sub ecx, dword [edi - 4]
sub eax, 0x104
or eax, ecx
mov byte [ebp - 4], 7
jge 0x403b6b
push 0x104
lea ecx, [ebp - 0x430]
call fcn.00404ae0
mov edi, dword [ebp - 0x430]
mov eax, dword [ebp - 0x424]
push esi
push 0x104
push edi
push eax
push str.LogDirName
push eax
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea esi, [edi - 0x10]
mov dword [ebp - 0x434], esi
test edi, edi
jne 0x403b96
xor eax, eax
jmp 0x403baa
push dword [esi + 8]
push edi
call fcn.00513bd0
add esp, 8
test eax, eax
js 0x403e7b
cmp eax, dword [esi + 8]
jg 0x403e7b
mov dword [esi + 4], eax
xor ecx, ecx
mov word [edi + eax*2], cx
mov ecx, dword [ebp - 0x428]
mov eax, ecx
and eax, 2
mov dword [ebx + 0xc], 0
and ecx, 1
mov dword [ebx + 4], eax
mov dword [ebx + 8], ecx
or ebx, 0xffffffff
test eax, eax
je 0x403de0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0050ce60
add esp, 0xc
lea eax, [ebp - 0x218]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
mov esi, dword [sym.imp.SHLWAPI.dll_PathAppendW]
lea eax, [ebp - 0x218]
push edi
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 eax, dword [ebp - 0x424]
mov ecx, dword [eax - 0x10]
test ecx, ecx
je 0x403c52
mov eax, dword [ecx]
call dword [eax + 0x10]
mov ecx, eax
test ecx, ecx
jne 0x403c60
call fcn.004048c0
mov ecx, eax
mov edx, dword [eax]
call dword [edx + 0x10]
mov ecx, eax
mov byte [ebp - 4], 9
test ecx, ecx
je 0x403e71
mov eax, dword [ecx]
call dword [eax + 0xc]
mov byte [ebp - 4], 8
mov dword [ebp - 0x444], 1
lea esi, [eax + 0x10]
mov eax, dword [ebp - 0x424]
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x448], eax
mov edi, dword [eax - 0xc]
mov dword [ebp - 0x440], edi
lea ecx, [edi + 4]
test ecx, ecx
js 0x403e7b
mov eax, dword [esi - 8]
mov edx, 1
sub edx, dword [esi - 4]
sub eax, ecx
or edx, eax
jge 0x403ccb
push ecx
lea ecx, [ebp - 0x428]
call fcn.00404ae0
mov esi, dword [ebp - 0x428]
add edi, edi
push edi
push dword [ebp - 0x448]
push edi
push esi
call fcn.00406660
lea ecx, [edi + esi]
add esp, 0x10
test ecx, ecx
jne 0x403cf7
call fcn.00513a32
mov dword [eax], 0x16
call fcn.0051041e
jmp 0x403d06
mov eax, dword [str..log]
mov dword [ecx], eax
mov eax, dword [0x5457a8]
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x440]
add eax, 4
cmp eax, dword [esi - 8]
jg 0x403e7b
mov dword [esi - 0xc], eax
xor ecx, ecx
mov word [esi + eax*2], cx
lea eax, [ebp - 0x218]
push esi
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
add esi, 0xfffffff0
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403d46
mov ecx, dword [esi]
push esi
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 edi, dword [ebp - 0x438]
mov dword [edi + 0xc], eax
cmp eax, 0xffffffff
jne 0x403dcb
mov edx, dword [ebp - 0x434]
mov eax, ebx
mov dword [edi + 4], 0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403d94
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x43c]
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403dae
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x424]
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x403e2f
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
jmp 0x403e2f
push 2
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, dword [ebp - 0x434]
jmp 0x403de6
mov edi, dword [ebp - 0x438]
mov eax, ebx
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x403dfa
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x43c]
mov eax, ebx
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x403e14
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x424]
add eax, 0xfffffff0
lock xadd dword [eax + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x403e2f
mov ecx, dword [eax]
push eax
mov edx, dword [ecx]
call dword [edx + 4]
mov eax, edi
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.004eda39
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.00404520
push eax
call fcn.00404520
push 0x80004005
call fcn.00404520
push 0x80004005
call fcn.00404520
push 0x80004005
call fcn.00404520
push 0x80070057
call fcn.00404520
int3