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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x50a62b
mov eax, dword fs:[0]
push eax
sub esp, 0x5b0
mov eax, dword [0x554418]
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
push 0x208
lea eax, [ebp - 0x298]
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
lea eax, [ebp - 0x298]
push eax
push 0
push 0
push 0x1a
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
lea eax, [ebp - 0x5ac]
push eax
lea ecx, [ebp - 0x5a5]
call fcn.00405ed0
push dword [eax]
lea eax, [ebp - 0x298]
push eax
call dword [sym.imp.SHLWAPI.dll_PathAppendW]
mov edx, dword [ebp - 0x5ac]
or eax, 0xffffffff
add edx, 0xfffffff0
lock xadd dword [edx + 0xc], eax
dec eax
test eax, eax
jg 0x407de8
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov ecx, 0x82
lea esi, [ebp - 0x298]
lea edi, [ebp - 0x5a4]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [ebp + 8]
mov edi, dword [edi + 4]
mov eax, dword [edi]
mov dword [ebp - 0x5ac], eax
cmp eax, edi
je 0x408043
lea ebx, [eax + 0x10]
xor cl, cl
lea eax, [ebx + 0x18]
mov dword [ebp - 0x5bc], eax
mov eax, dword [eax]
sub eax, 1
je 0x407e36
sub eax, 1
jne 0x40801b
mov cl, 1
jmp 0x40801b
cmp dword [ebx + 0x14], 0x10
jb 0x407e3e
mov ebx, dword [ebx]
lea eax, [ebp - 0x398]
mov dword [ebp - 0x39c], eax
test ebx, ebx
jne 0x407e5b
xor esi, esi
mov dword [ebp - 0x39c], esi
jmp 0x407f20
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x407e60
sub ecx, edx
lea eax, [ebp - 0x398]
push 0x80
push eax
lea eax, [ebp - 0x39c]
lea esi, [ecx + 1]
push esi
push eax
mov dword [ebp - 0x5b4], esi
call fcn.00403f80
add esp, 0x10
push esi
push dword [ebp - 0x39c]
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
xor ecx, ecx
test eax, eax
sete cl
mov dword [ebp - 0x5b0], ecx
test eax, eax
jne 0x407f12
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x407f0c
push 0
push 0
push esi
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
lea eax, [ebp - 0x398]
push 0x80
push eax
lea eax, [ebp - 0x39c]
push esi
push eax
call fcn.00403f80
add esp, 0x10
push esi
push dword [ebp - 0x39c]
push dword [ebp - 0x5b4]
push ebx
push 0
push 3
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, eax
neg ecx
sbb ecx, ecx
inc ecx
jmp 0x407f12
mov ecx, dword [ebp - 0x5b0]
test ecx, ecx
jne 0x408061
mov esi, dword [ebp - 0x39c]
push 0x80
lea eax, [ebp - 0x90]
mov dword [ebp - 4], 0
push 0
push eax
call fcn.004d3ba0
add esp, 0xc
lea eax, [ebp - 0x5b8]
lea ecx, [ebp - 0x5a5]
push eax
call fcn.00405e50
lea eax, [ebp - 0x5a4]
push eax
push 0x40
lea eax, [ebp - 0x90]
push eax
push 0x51699c
push esi
mov esi, dword [ebp - 0x5b8]
push esi
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
lea eax, [ebp - 0x90]
lea edx, [eax + 2]
nop dword [eax + eax]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x407f80
sub eax, edx
sar eax, 1
je 0x407fd6
mov ecx, 0x516ac8
lea eax, [ebp - 0x90]
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407fc6
test dx, dx
je 0x407fc2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407fc6
add eax, 4
add ecx, 4
test dx, dx
jne 0x407fa0
xor eax, eax
jmp 0x407fcb
sbb eax, eax
or eax, 1
mov byte [ebp - 0x5a5], 0
test eax, eax
jne 0x407fdd
mov byte [ebp - 0x5a5], 1
add esi, 0xfffffff0
or eax, 0xffffffff
lock xadd dword [esi + 0xc], eax
dec eax
test eax, eax
jg 0x407ff5
mov ecx, dword [esi]
push esi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, dword [ebp - 0x39c]
lea ecx, [ebp - 0x398]
mov dword [ebp - 4], 0xffffffff
cmp eax, ecx
je 0x408015
push eax
call fcn.004d7064
add esp, 4
mov cl, byte [ebp - 0x5a5]
xor eax, eax
test cl, cl
mov ecx, dword [ebp - 0x5bc]
setne al
mov dword [ecx], eax
lea ecx, [ebp - 0x5ac]
call fcn.00405aa0
mov eax, dword [ebp - 0x5ac]
cmp eax, edi
jne 0x407e11
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.0043f0c9
mov esp, ebp
pop ebp
ret 4
push 0x80
lea eax, [ebp - 0x398]
push eax
push dword [ebp - 0x39c]
call fcn.00404000
add esp, 0xc
call fcn.004062b0
int3