Function at 0x10022ab0
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 0x10022dfa
mov eax, dword [ebp - 0x830]
cmp eax, 4
jne 0x10022b32
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.1003a1d0
mov esp, ebp
pop ebp
ret
cmp eax, 1
jne 0x10022dfa
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.10019010
call fcn.10022350
test ax, ax
jne 0x10022e9c
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 0x10022ba8
cmp dword [ebp - 0x830], 1
je 0x10022bc2
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 0x10022bd2
xor esi, esi
jmp 0x10022bde
movzx esi, ax
shl esi, 5
add esi, section..data
inc eax
mov dword [ebp - 0x83c], eax
test esi, esi
je 0x10022b1f
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 0x10022c18
mov eax, ebx
and eax, 0x300000
cmp eax, 0x100000
je 0x10022bc2
test ebx, 0x100000
je 0x10022c72
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 0x10022c72
cmp dword [ebp - 0x830], 1
jne 0x10022c72
mov eax, dword [ebp - 0x838]
mov ebx, dword [eax + 0x110]
test ebx, ebx
jne 0x10022cf9
mov ebx, dword [ebp - 0x834]
test ebx, 0x200000
je 0x10022bc2
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 0x10022cde
test dx, dx
je 0x10022cda
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x10022cde
add eax, 4
add ecx, 4
test dx, dx
jne 0x10022cb8
xor eax, eax
jmp 0x10022ce3
sbb eax, eax
or eax, 1
test eax, eax
je 0x10022bc2
mov ebx, dword [ebx + 0x10c]
test ebx, ebx
je 0x10022bc2
sub edi, 1
je 0x10022dc9
sub edi, 1
je 0x10022d8f
sub edi, 1
jne 0x10022bc2
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 0x10022d68
lea eax, [ebp - 0x210]
push 0x10003a60
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
je 0x10022d68
lea eax, [ebp - 0x210]
push 0x10003a68
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
add esp, 8
test eax, eax
jne 0x10022d74
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 0x10022bc2
lea ecx, [ebp - 0x210]
lea edx, [ecx + 2]
jmp 0x10022da0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x10022da0
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 0x10022bc2
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 0x10022bc2
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 0x10022e52
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.10019780
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.1003a1d0
mov esp, ebp
pop ebp
ret