Function at 0x10022f60
Capabilities:
Query or enumerate registry value
Read .ini file
Set registry value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x844
mov eax, dword [0x1003f6e4]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x83c], 0
push eax
lea eax, [ebp - 0x210]
mov dword [ebp - 0x82c], 0x208
push eax
lea eax, [ebp - 0x830]
mov ebx, ecx
push eax
push 0
push 0x10001c08
push dword [ebx + 0x110]
mov dword [ebp - 0x838], ebx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x100232aa
mov eax, dword [ebp - 0x830]
cmp eax, 4
jne 0x10022fe2
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003a750
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x100232aa
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
add esp, 4
movzx edx, al
mov ecx, ebx
mov dword [ebx + 0xa8], eax
call fcn.10019620
call fcn.100227d0
test ax, ax
jne 0x1002334c
lea eax, [ebp - 0x82c]
mov dword [ebp - 0x82c], 0x208
push eax
lea eax, [ebp - 0x620]
push eax
lea eax, [ebp - 0x830]
push eax
push 0
push 0x10003a14
push dword [ebx + 0x110]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10023058
cmp dword [ebp - 0x830], 1
je 0x10023072
push 0x10003a2c
lea eax, [ebp - 0x620]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_wcscpy_s]
add esp, 0xc
mov eax, dword [ebp - 0x83c]
cmp ax, 0x1d
jb 0x10023082
xor esi, esi
jmp 0x1002308e
movzx esi, ax
shl esi, 5
add esi, section..data
inc eax
mov dword [ebp - 0x83c], eax
test esi, esi
je 0x10022fcf
mov ebx, dword [esi + 8]
mov edi, ebx
and edi, 0xf
mov dword [ebp - 0x834], ebx
mov dword [ebp - 0x82c], 0x208
cmp edi, 2
jne 0x100230c8
mov eax, ebx
and eax, 0x300000
cmp eax, 0x100000
je 0x10023072
test ebx, 0x100000
je 0x10023122
lea eax, [ebp - 0x82c]
push eax
lea eax, [ebp - 0x210]
push eax
lea eax, [ebp - 0x830]
push eax
mov eax, dword [ebp - 0x838]
push 0
push dword [esi]
push dword [eax + 0x110]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x10023122
cmp dword [ebp - 0x830], 1
jne 0x10023122
mov eax, dword [ebp - 0x838]
mov ebx, dword [eax + 0x110]
test ebx, ebx
jne 0x100231a9
mov ebx, dword [ebp - 0x834]
test ebx, 0x200000
je 0x10023072
mov ebx, dword [ebp - 0x838]
lea eax, [ebp - 0x620]
push eax
push 0x104
lea eax, [ebp - 0x210]
push eax
mov eax, dword [ebx + 0xac]
push 0x10003a44
push dword [esi]
push dword [eax + 4]
call dword [sym.imp.KERNEL32.dll_GetPrivateProfileStringW]
mov ecx, 0x10003a44
lea eax, [ebp - 0x210]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x1002318e
test dx, dx
je 0x1002318a
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x1002318e
add eax, 4
add ecx, 4
test dx, dx
jne 0x10023168
xor eax, eax
jmp 0x10023193
sbb eax, eax
or eax, 1
test eax, eax
je 0x10023072
mov ebx, dword [ebx + 0x10c]
test ebx, ebx
je 0x10023072
sub edi, 1
je 0x10023279
sub edi, 1
je 0x1002323f
sub edi, 1
jne 0x10023072
xor eax, eax
mov word [ebp - 0x834], ax
lea eax, [ebp - 0x210]
push 0x100021cc
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x10023218
lea eax, [ebp - 0x210]
push 0x10003a60
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x10023218
lea eax, [ebp - 0x210]
push 0x10003a68
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x10023224
mov eax, 1
mov word [ebp - 0x834], ax
push 1
lea eax, [ebp - 0x834]
push eax
push 3
push 0
push dword [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x10023072
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
jmp 0x10023250
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10023250
sub ecx, edx
lea eax, [ebp - 0x210]
sar ecx, 1
push ecx
push eax
push 1
push 0
push dword [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x10023072
lea eax, [ebp - 0x210]
push eax
call dword [sym.imp.msvcrt.dll__wtoi]
add esp, 4
mov dword [ebp - 0x840], eax
lea eax, [ebp - 0x840]
push 4
push eax
push 4
push 0
push dword [esi]
push ebx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x10023072
xor eax, eax
push 0x104
mov word [ebp - 0x418], ax
lea eax, [ebp - 0x418]
push eax
push 0xb3b0
push dword [0x10041578]
call dword [sym.imp.USER32.dll_LoadStringW]
cmp word [ebp - 0x418], 0
jne 0x10023302
mov esi, dword [0x1004138c]
lea eax, [ebp - 0x418]
push 0x104
push eax
push 0xb3b0
mov ecx, esi
call dword [0x10042350]
call esi
push eax
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x10001c08
lea eax, [ebp - 0x418]
push eax
lea eax, [ebp - 0x828]
push 0x104
push eax
call dword [sym.imp.msvcrt.dll_swprintf_s]
add esp, 0x10
lea eax, [ebx + 0x6c]
lea edx, [ebp - 0x828]
mov ecx, 0x3f
push 0
push 0
push 0xfffffffffffffffe
push 0xfffffffffffffffe
push 0xa410
push 0xa4d8
push eax
push dword [ebx + 0x7c]
call fcn.10019d30
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003a750
mov esp, ebp
pop ebp
ret