Function at 0x40d6d0
Capabilities:
Check if file exists
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x44b0e6
mov eax, dword fs:[0]
push eax
mov eax, 0x2234
call fcn.0042a870
mov eax, dword [0x465944]
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 - 0x2234], esi
mov edi, dword [ebp + 8]
lea eax, [ebp - 0x218]
push 0x208
mov dword [ebp - 0x223c], edi
mov dword [ebp - 0x2230], 0
push 0
push eax
mov dword [ebp - 0x2238], edi
mov dword [ebp - 0x223c], 1
mov dword [ebp - 0x2240], 0x104
call fcn.0042c930
add esp, 0xc
cmp dword [ebp + 0xc], 0
jne 0x40d767
mov ecx, dword [esi]
cmp dword [ecx - 8], 0
je 0x40d767
push esi
mov ecx, edi
call fcn.00406950
jmp 0x40dc93
cmp dword [esi + 0xc], 0
je 0x40d7b1
lea eax, [ebp - 0x2240]
push eax
lea eax, [ebp - 0x218]
push eax
lea eax, [ebp - 0x223c]
push eax
push dword [esi + 0x18]
push dword [esi + 0x14]
push dword [esi + 0x10]
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
lea ecx, [ebp - 0x218]
lea edx, [ecx + 2]
nop word [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40d7a0
sub ecx, edx
sar ecx, 1
jne 0x40d7e5
movups xmm0, xmmword [str.configdefaultskin]
mov eax, dword [0x44f200]
mov dword [ebp - 0x1f8], eax
mov ax, word [0x44f204]
movups xmmword [ebp - 0x218], xmm0
mov word [ebp - 0x1f4], ax
movups xmm0, xmmword [0x44f1f0]
movups xmmword [ebp - 0x208], xmm0
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [ebp - 0x218]
push ecx
push eax
mov ecx, esi
call fcn.004077d0
mov eax, dword [0x4644dc]
lea ecx, [ebp - 0x2228]
push 1
mov dword [ebp - 0x2228], eax
call fcn.00407630
mov edi, dword [ebp - 0x2228]
test eax, eax
je 0x40d82b
mov eax, 0x5c
mov word [edi], ax
push 1
lea eax, [ebp - 0x2224]
mov dword [ebp - 4], 0
push eax
mov ecx, esi
mov dword [ebp - 0x2230], 2
call fcn.0040f7c0
mov eax, dword [eax]
mov ecx, 6
mov dword [ebp - 0x221c], ecx
mov dword [ebp - 0x2230], ecx
mov ecx, edi
mov dword [ebp - 4], 1
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d88e
test dx, dx
je 0x40d88a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d88e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d868
xor eax, eax
jmp 0x40d893
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d930
mov eax, dword [0x4644dc]
lea ecx, [ebp - 0x221c]
push 1
mov dword [ebp - 0x221c], eax
call fcn.00407630
mov esi, dword [ebp - 0x221c]
test eax, eax
je 0x40d8c5
mov eax, 0x2f
mov word [esi], ax
mov ecx, dword [ebp - 0x2234]
lea eax, [ebp - 0x222c]
push 1
push eax
mov dword [ebp - 4], 2
mov dword [ebp - 0x2230], 0xe
call fcn.0040f7c0
mov dword [ebp - 0x221c], 0x1e
mov ecx, esi
mov eax, dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40d91e
test dx, dx
je 0x40d91a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40d91e
add eax, 4
add ecx, 4
test dx, dx
jne 0x40d8f8
xor eax, eax
jmp 0x40d923
sbb eax, eax
or eax, 1
test eax, eax
je 0x40d936
mov byte [ebp - 0x221d], 0
jmp 0x40d93d
mov esi, dword [ebp - 0x221c]
mov byte [ebp - 0x221d], 1
mov eax, dword [ebp - 0x221c]
mov edx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test al, 0x10
je 0x40d98f
and eax, 0xffffffef
mov dword [ebp - 0x221c], eax
mov eax, dword [ebp - 0x222c]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x40d989
add eax, 0xfffffff4
push eax
call edx
test eax, eax
jg 0x40d983
mov eax, dword [ebp - 0x222c]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
mov edx, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
mov eax, dword [ebp - 0x221c]
test al, 8
je 0x40d9b1
lea eax, [esi - 0xc]
cmp eax, dword [0x4644d8]
je 0x40d9b1
add esi, 0xfffffff4
push esi
call edx
test eax, eax
jg 0x40d9b1
push esi
call fcn.00425cdd
add esp, 4
mov eax, dword [ebp - 0x2224]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea ecx, [eax - 0xc]
cmp ecx, dword [0x4644d8]
je 0x40d9e4
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40d9e4
mov eax, dword [ebp - 0x2224]
add eax, 0xfffffff4
push eax
call fcn.00425cdd
add esp, 4
lea eax, [edi - 0xc]
mov dword [ebp - 4], 0xffffffff
cmp eax, dword [0x4644d8]
je 0x40da09
add edi, 0xfffffff4
push edi
call esi
test eax, eax
jg 0x40da09
push edi
call fcn.00425cdd
add esp, 4
cmp byte [ebp - 0x221d], 0
mov esi, dword [ebp - 0x2234]
je 0x40db0f
mov eax, dword [esi]
xor ecx, ecx
mov dword [ebp - 0x221c], 1
mov edi, dword [eax - 8]
lea eax, [edi - 1]
test eax, eax
cmovns ecx, eax
mov dword [ebp - 0x2224], ecx
cmp ecx, edi
jge 0x40db0f
lea eax, [ecx + 1]
cmp eax, edi
jle 0x40da54
mov eax, edi
sub eax, ecx
mov dword [ebp - 0x221c], eax
mov ecx, esi
call fcn.0040bf20
mov edx, dword [ebp - 0x2224]
mov eax, edi
mov ecx, dword [esi]
sub eax, edx
sub eax, dword [ebp - 0x221c]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2224], eax
mov eax, dword [ebp - 0x221c]
add eax, edx
lea eax, [ecx + eax*2]
mov dword [ebp - 0x222c], eax
mov eax, dword [ecx - 4]
sub eax, edx
lea edx, [ecx + edx*2]
lea eax, [eax*2 + 2]
mov dword [ebp - 0x2228], eax
mov eax, dword [ebp - 0x2224]
test eax, eax
je 0x40daf9
test edx, edx
jne 0x40dac5
call fcn.0042f502
mov dword [eax], 0x16
call fcn.0042f429
mov eax, 0x16
jmp 0x40dafb
mov ecx, dword [ebp - 0x222c]
test ecx, ecx
je 0x40daae
cmp dword [ebp - 0x2228], eax
jae 0x40daee
call fcn.0042f502
mov dword [eax], 0x22
call fcn.0042f429
mov eax, 0x22
jmp 0x40dafb
push eax
push ecx
push edx
call fcn.0042c3b0
add esp, 0xc
xor eax, eax
push eax
call fcn.00407860
mov eax, dword [esi]
add esp, 4
sub edi, dword [ebp - 0x221c]
mov dword [eax - 8], edi
xor eax, eax
push 0x1000
push eax
mov word [ebp - 0xa18], ax
lea eax, [ebp - 0x2218]
push eax
call fcn.0042c930
add esp, 0xc
lea eax, [ebp - 0x2218]
push 0x800
push eax
push dword [esi + 4]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x2218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
push 0x400
lea eax, [ebp - 0x2218]
push eax
lea eax, [ebp - 0xa18]
push eax
call fcn.00433b17
xor edi, edi
add esp, 0xc
cmp dword [esi + 8], edi
jle 0x40db84
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
inc edi
cmp edi, dword [esi + 8]
jl 0x40db71
push dword [esi]
mov edi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
lea eax, [ebp - 0xa18]
push eax
push eax
call edi
push 0x7fe
lea eax, [ebp - 0x1216]
push 0
push eax
call fcn.0042c930
xor eax, eax
push 0x1000
push eax
mov word [ebp - 0x1218], ax
lea eax, [ebp - 0x2218]
push eax
call fcn.0042c930
add esp, 0x18
lea eax, [ebp - 0xa18]
push eax
call dword [sym.imp.SHLWAPI.dll_PathIsRelativeW]
test eax, eax
je 0x40dc12
push 0x800
lea eax, [ebp - 0x2218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea eax, [ebp - 0x2218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathRemoveFileSpecW]
lea eax, [ebp - 0xa18]
push eax
lea eax, [ebp - 0x2218]
push eax
push eax
call edi
lea eax, [ebp - 0x2218]
jmp 0x40dc18
lea eax, [ebp - 0xa18]
push 0x400
push eax
lea eax, [ebp - 0x1218]
push eax
call fcn.00433b17
add esp, 0xc
lea eax, [ebp - 0x1218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x40dc56
push str.configdefaultskin
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push str.configdefaultskin
push eax
mov ecx, esi
call fcn.004077d0
mov eax, dword [esi]
cmp dword [eax - 0xc], 0
lea ecx, [eax - 0xc]
mov edi, dword [ebp - 0x2238]
jl 0x40dc72
push ecx
mov dword [edi], eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
jmp 0x40dc93
mov eax, dword [0x4644dc]
mov dword [edi], eax
mov esi, dword [esi]
test esi, esi
jne 0x40dc83
xor eax, eax
jmp 0x40dc8a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
push esi
push eax
mov ecx, edi
call fcn.004077d0
mov eax, edi
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.0042a853
mov esp, ebp
pop ebp
ret 8