Function at 0x1003a8a
Capabilities:
Query or enumerate registry value
Set registry value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
push dword [ebp + 0x10]
mov esi, dword [ebp + 8]
push dword [ebp + 0xc]
push esi
call fcn.01003876
xor ebx, ebx
cmp eax, ebx
jne 0x1003d74
push esi
call fcn.010021fb
cmp eax, ebx
jne 0x1003d74
push edi
lea eax, [ebp - 0x1c]
push eax
lea eax, [ebp + 0x10]
push eax
push ebx
push 0x2001f
push ebx
push ebx
push ebx
push dword [esi + 0x30]
push dword [esi]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x1003d71
mov eax, dword [esi + 0x34]
cmp eax, ebx
je 0x1003d71
lea ecx, [ebp - 4]
push ecx
push ebx
lea ecx, [ebp - 0x20]
push ecx
push ebx
push eax
push dword [ebp + 0x10]
mov dword [ebp - 4], 1
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
cmp eax, ebx
jne 0x1003b2e
push dword [esi + 0x1c]
push dword [esi + 0x34]
push 0x10016f0
call fcn.010024f7
test eax, eax
jne 0x1003b2e
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
jmp 0x1003d73
mov eax, dword [esi + 8]
cmp eax, 2
jbe 0x1003d3a
cmp eax, 3
je 0x1003c96
jbe 0x1003d63
cmp eax, 5
jbe 0x1003c63
cmp eax, 7
jne 0x1003d63
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
lea eax, [esi + 0x40]
push eax
mov dword [ebp - 0x18], ebx
call edi
push dword [esi + 0x3c]
mov dword [ebp - 0x14], eax
mov dword [ebp - 8], ebx
call edi
mov dword [ebp - 4], eax
add eax, 2
push 2
push eax
call dword [sym.imp.msvcrt.dll_calloc]
mov ebx, eax
mov eax, dword [esi + 0x3c]
add esp, 0x10
test ebx, ebx
mov dword [ebp + 8], ebx
mov dword [ebp + 0xc], eax
jne 0x1003bfe
push 8
pop edi
jmp 0x1003d71
lea eax, [esi + 0x40]
push eax
push dword [ebp + 0xc]
call dword [sym.imp.msvcrt.dll_wcsstr]
test eax, eax
pop ecx
pop ecx
mov dword [ebp - 0x10], eax
je 0x1003bd4
and dword [ebp - 8], 0
cmp eax, dword [ebp + 0xc]
je 0x1003c08
push eax
call edi
cmp eax, dword [ebp - 0x14]
pop ecx
jne 0x1003bcd
mov dword [ebp - 8], 1
mov eax, dword [ebp - 0x10]
and word [eax], 0
push dword [ebp + 0xc]
push ebx
call dword [sym.imp.msvcrt.dll_wcscat]
push ebx
call edi
lea ebx, [ebx + eax*2 + 2]
mov eax, dword [ebp - 0x10]
add esp, 0xc
test eax, eax
je 0x1003c0f
cmp dword [ebp - 8], 0
jne 0x1003c0f
mov ecx, dword [ebp - 0x14]
lea eax, [eax + ecx*2]
mov dword [ebp + 0xc], eax
push eax
call edi
test eax, eax
pop ecx
ja 0x1003b9e
jmp 0x1003c0f
mov dword [ebp - 0x18], 1
lea eax, [esi + 0x40]
push eax
push dword [esi + 0x3c]
call dword [sym.imp.msvcrt.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
jne 0x1003c2a
mov ebx, dword [ebp + 8]
add ebx, 4
jmp 0x1003c36
inc ebx
inc ebx
cmp dword [ebp - 0x18], 0
jne 0x1003d30
sub ebx, dword [ebp + 8]
sar ebx, 1
shl ebx, 1
push ebx
push dword [ebp + 8]
push dword [esi + 8]
push 0
push dword [esi + 0x34]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
push dword [ebp + 8]
call dword [sym.imp.msvcrt.dll_free]
pop ecx
jmp 0x1003d68
push ebx
lea eax, [ebp + 0xc]
push eax
push dword [esi + 0x3c]
mov dword [ebp + 0xc], ebx
call dword [sym.imp.msvcrt.dll_wcstoul]
push dword [ebp + 0xc]
mov dword [ebp + 8], eax
call dword [sym.imp.msvcrt.dll_wcslen]
add esp, 0x10
test eax, eax
ja 0x1003d63
push 4
lea eax, [ebp + 8]
push eax
jmp 0x1003d4f
push dword [esi + 0x3c]
mov edi, dword [sym.imp.msvcrt.dll_wcslen]
call edi
mov ecx, eax
mov dword [ebp - 4], eax
shr ecx, 1
and eax, 1
add ecx, eax
push 1
push ecx
call dword [sym.imp.msvcrt.dll_calloc]
add esp, 0xc
cmp eax, ebx
mov dword [ebp + 8], eax
je 0x1003b96
mov word [ebp - 0xc], bx
mov dword [ebp + 0xc], ebx
mov ebx, dword [esi + 0x3c]
jmp 0x1003d20
mov ax, word [ebx]
inc ebx
inc ebx
push ebx
mov word [ebp - 0x10], ax
call edi
test eax, eax
pop ecx
jbe 0x1003cec
mov ax, word [ebx]
inc ebx
mov word [ebp - 0xe], ax
inc ebx
jmp 0x1003cf2
mov word [ebp - 0xe], 0x30
push 0x10
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x10]
push eax
call dword [sym.imp.msvcrt.dll_wcstol]
push dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
call edi
add esp, 0x10
test eax, eax
ja 0x1003d30
mov edx, dword [ebp + 0xc]
mov al, byte [ebp - 0x14]
mov ecx, dword [ebp + 8]
inc dword [ebp + 0xc]
mov byte [ecx + edx], al
push ebx
call edi
test eax, eax
pop ecx
ja 0x1003cd0
push dword [ebp + 0xc]
jmp 0x1003c3e
mov edi, 0xc352
jmp 0x1003c54
push dword [esi + 0x3c]
call dword [sym.imp.msvcrt.dll_wcslen]
pop ecx
lea eax, [eax + eax + 2]
push eax
push dword [esi + 0x3c]
mov dword [ebp - 4], eax
push dword [esi + 8]
push ebx
push dword [esi + 0x34]
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
jmp 0x1003d68
mov edi, 0xc352
push dword [ebp + 0x10]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, edi
pop edi
pop esi
pop ebx
leave
ret 0xc