Function at 0x406d30
Capabilities:
Check if file exists
Query or enumerate registry value
Read .ini file

Disassembly:
mov eax, 0x2228
call fcn.0044c0a0
push ebx
mov ebx, dword [esp + 0x2230]
push ebp
push esi
mov edx, dword [ebx]
push edi
test edx, edx
mov dword [esp + 0x28], ecx
je 0x406d68
mov esi, dword [ebx + 4]
test esi, esi
je 0x406d68
mov eax, dword [ebx + 0xc]
test eax, eax
je 0x406d68
mov ecx, dword [ebx + 0x10]
cmp ecx, 0x80
jg 0x406d77
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2228
ret 8
mov edi, dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
push edx
push ecx
push eax
mov eax, dword [ebx + 8]
push eax
push str.RegAppEntry
push esi
call edi
mov eax, dword [ebx + 0xc]
mov si, word [eax]
neg si
sbb esi, esi
and esi, eax
mov eax, dword [0x4881a0]
test esi, esi
mov dword [esp + 0x10], eax
je 0x406df6
mov ecx, esi
shr ecx, 0x10
jne 0x406dbf
and esi, 0xffff
lea ecx, [esp + 0x10]
push esi
call fcn.004032e0
jmp 0x406df2
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov ebp, eax
test ebp, ebp
je 0x406df2
push ebp
lea ecx, [esp + 0x14]
call fcn.004036b0
test eax, eax
je 0x406df2
mov ecx, dword [esp + 0x10]
lea edx, [ebp + ebp]
push edx
lea eax, [ebp + ebp + 2]
push esi
push eax
push ecx
call fcn.004029e0
add esp, 0x10
mov eax, dword [esp + 0x10]
mov edx, dword [eax - 8]
test edx, edx
jne 0x406e2d
mov ecx, dword [0x4881a4]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x40717d
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x40717d
mov eax, dword [esp + 0x10]
add eax, 0xfffffff4
push eax
jmp 0x407175
mov ebp, dword [esp + 0x2240]
mov ecx, dword [ebp + 0x34]
lea esi, [ebp + 0x34]
cmp ecx, eax
je 0x406e78
cmp dword [ecx - 0xc], 0
jge 0x406e4f
add ecx, 0xfffffff4
cmp ecx, dword [0x4881a4]
jne 0x406e56
mov ecx, dword [eax - 0xc]
test ecx, ecx
jge 0x406e61
push eax
push edx
mov ecx, esi
call fcn.00403710
jmp 0x406e78
mov ecx, esi
call fcn.004039a0
mov eax, dword [esp + 0x10]
mov dword [esi], eax
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedIncrement]
mov ecx, dword [ebx]
mov edx, dword [ebx + 0x10]
mov eax, dword [ebx + 0xc]
push ecx
mov ecx, dword [ebx + 8]
push edx
mov edx, dword [ebx + 4]
push eax
push ecx
push str.RegAppPath
push edx
call edi
mov esi, dword [ebx + 0xc]
cmp word [esi], 0
je 0x406e9f
test esi, esi
jne 0x406edd
mov eax, dword [esp + 0x10]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x406ece
add eax, 0xfffffff4
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
test eax, eax
jg 0x406ece
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x2228
ret 8
push esi
call fcn.0041cf10
mov cx, word [0x4889ec]
mov edi, eax
mov ax, word [0x4918b0]
push eax
push ecx
push esi
call fcn.0041ce00
mov edx, dword [0x4881a0]
mov eax, esi
add esp, 0x10
mov dword [esp + 0x14], edx
shr eax, 0x10
jne 0x406f22
mov ecx, esi
and ecx, 0xffff
push ecx
lea ecx, [esp + 0x18]
call fcn.004032e0
jmp 0x406f5a
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
mov dword [esp + 0x2c], eax
je 0x406f5a
push eax
lea ecx, [esp + 0x18]
call fcn.004036b0
test eax, eax
je 0x406f5a
mov eax, dword [esp + 0x2c]
mov ecx, dword [esp + 0x14]
lea edx, [eax + eax]
lea eax, [eax + eax + 2]
push edx
push esi
push eax
push ecx
call fcn.004029e0
add esp, 0x10
mov ecx, dword [esp + 0x28]
lea edx, [esp + 0x14]
push edx
call fcn.00407190
mov dword [ebp + 0x28], eax
lea eax, [ebp + 0x2c]
push eax
push edi
push esi
call fcn.0041cf70
lea esi, [ebp + 0x30]
push esi
push edi
push eax
call fcn.0041cf70
mov ecx, 0x800
xor eax, eax
lea edi, [esp + 0x250]
add esp, 0x18
rep stosd dword es:[edi], eax
lea eax, [esp + 0x24]
lea ecx, [esp + 0x238]
push eax
mov eax, dword [esi]
lea edx, [esp + 0x24]
push ecx
mov ecx, dword [ebp + 0x2c]
push edx
mov edx, dword [ebp + 0x28]
push eax
push ecx
push edx
mov dword [esp + 0x38], 1
mov dword [esp + 0x3c], 0x1000
call dword [sym.imp.SHLWAPI.dll_SHGetValueW]
cmp dword [esp + 0x20], 1
jne 0x407121
cmp word [esp + 0x238], 0
je 0x407121
mov eax, dword [esp + 0x24]
test eax, eax
jbe 0x407121
lea eax, [esp + 0x238]
lea ecx, [esp + 0x18]
push eax
call fcn.00408830
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
mov esi, dword [sym.imp.SHLWAPI.dll_PathCombineW]
push ecx
lea eax, [esp + 0x23c]
push edx
push eax
call esi
mov edi, dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
lea ecx, [esp + 0x238]
push ecx
call edi
test eax, eax
jne 0x407059
lea ecx, [esp + 0x18]
call fcn.00403680
lea ecx, [esp + 0x14]
call fcn.00403680
lea ecx, [esp + 0x10]
call fcn.00403680
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2228
ret 8
lea edx, [esp + 0x18]
lea ecx, [ebp + 0x24]
push edx
mov dword [ebp + 0x78], 1
call fcn.004089c0
push str.RegVersionFile
mov ecx, ebx
call fcn.00406100
push eax
lea ecx, [esp + 0x20]
call fcn.00408830
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax - 8]
test ecx, ecx
jne 0x40709c
lea ecx, [esp + 0x10]
push ecx
lea ecx, [esp + 0x20]
call fcn.004089c0
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
push edx
lea ecx, [esp + 0x23c]
push eax
push ecx
call esi
lea edx, [esp + 0x238]
push edx
call edi
test eax, eax
jne 0x4070d2
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x18]
push eax
lea edx, [esp + 0x23c]
push ecx
push edx
call esi
lea eax, [esp + 0x30]
push 0x104
lea ecx, [esp + 0x23c]
push eax
push ecx
call fcn.00407250
lea edx, [esp + 0x3c]
add esp, 0xc
add ebp, 0x1c
test edx, edx
jne 0x4070fb
xor eax, eax
jmp 0x407106
lea eax, [esp + 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea ecx, [esp + 0x30]
push ecx
push eax
mov ecx, ebp
call fcn.00403710
lea ecx, [esp + 0x1c]
call fcn.00403680
jmp 0x40702c
mov eax, dword [esp + 0x14]
mov ecx, dword [0x4881a4]
mov esi, dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
lea edx, [eax - 0xc]
cmp edx, ecx
je 0x407152
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x407152
mov eax, dword [esp + 0x14]
add eax, 0xfffffff4
push eax
call fcn.004472d3
add esp, 4
mov eax, dword [esp + 0x10]
mov edx, dword [0x4881a4]
lea ecx, [eax - 0xc]
cmp ecx, edx
je 0x40717d
add eax, 0xfffffff4
push eax
call esi
test eax, eax
jg 0x40717d
mov edx, dword [esp + 0x10]
add edx, 0xfffffff4
push edx
call fcn.004472d3
add esp, 4
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x2228
ret 8