Function at 0x413b91
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2124
call fcn.00522d80
mov eax, dword [0x56afe8]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x2124], eax
xor eax, eax
push esi
mov esi, dword [ebp + 0xc]
push edi
mov dword [ebp - 0x210c], eax
mov edi, ecx
lea eax, [ebp - 0x2004]
mov dword [ebp - 0x2120], edi
push eax
mov dword [ebp - 0x2114], ebx
mov dword [ebp - 0x2110], esi
call fcn.004174cd
test eax, eax
js 0x413e97
lea eax, [ebp - 0x210c]
push eax
lea eax, [ebp - 0x2004]
push eax
call fcn.00419846
pop ecx
pop ecx
test eax, eax
jne 0x413c0d
mov eax, 0x80020009
jmp 0x413e97
mov ecx, edi
call fcn.00418c23
lea eax, [ebp - 0x2004]
mov ecx, edi
push eax
call fcn.004174cd
test eax, eax
js 0x413e97
movzx eax, word [ebp - 0x210c]
sub eax, 8
je 0x413e5e
sub eax, 9
je 0x413d58
dec eax
sub eax, 1
je 0x413d12
sub eax, 0x3ff5
jne 0x413e84
lea eax, [ebp - 0x2004]
push eax
call sub.msvcrt.dll_wcslen
and dword [ebp - 0x2108], 0
add eax, 2
pop ecx
push eax
lea ecx, [ebp - 0x2108]
call fcn.00413ed7
mov esi, dword [ebp - 0x2108]
test esi, esi
je 0x413cf1
cmp word [ebp - 0x2004], 0
lea edi, [ebp - 0x2004]
je 0x413cd0
xor ebx, ebx
push edi
call dword [sym.imp.USER32.dll_CharNextW]
movzx ecx, word [edi]
cmp ecx, 0x5c
jne 0x413cbc
cmp word [eax], 0x30
jne 0x413cbc
xor ecx, ecx
push eax
mov word [esi], cx
call dword [sym.imp.USER32.dll_CharNextW]
mov edi, eax
jmp 0x413cc2
mov word [esi], cx
add edi, 2
add esi, 2
cmp word [edi], bx
jne 0x413c97
mov ebx, dword [ebp - 0x2114]
xor eax, eax
mov ecx, ebx
mov dword [esi], eax
push dword [ebp - 0x2108]
push dword [ebp - 0x2110]
call fcn.00418b17
mov esi, dword [ebp - 0x2108]
mov edi, eax
jmp 0x413cf4
push 0xe
pop edi
lea eax, [ebp - 0x2104]
cmp esi, eax
je 0x413e71
lea ecx, [ebp - 0x2108]
call fcn.004152f3
jmp 0x413e71
lea eax, [ebp - 0x2114]
xor edi, edi
push eax
push edi
push edi
lea eax, [ebp - 0x2004]
push eax
call dword [sym.imp.OLEAUT32.dll_VarUI4FromDisp]
test eax, eax
js 0x413e97
mov eax, dword [ebp - 0x2114]
push 4
mov dword [ebp - 0x2110], eax
lea eax, [ebp - 0x2110]
push eax
push 4
push edi
push esi
push dword [ebx]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
jmp 0x413e6f
lea eax, [ebp - 0x2004]
push eax
call sub.msvcrt.dll_wcslen
mov dword [ebp - 0x2118], eax
pop ecx
test al, 1
jne 0x413da3
cdq
lea ecx, [ebp - 0x2108]
sub eax, edx
xor edi, edi
mov ebx, eax
mov dword [ebp - 0x2108], edi
sar ebx, 1
push ebx
mov dword [ebp - 0x211c], ebx
call fcn.00413ea8
cmp dword [ebp - 0x2108], edi
jne 0x413dad
lea ecx, [ebp - 0x2108]
call fcn.004152f3
mov eax, 0x80004005
jmp 0x413e97
push ebx
push edi
push dword [ebp - 0x2108]
call sub.msvcrt.dll_memset
mov eax, edi
mov dword [ebp - 0x210c], edi
add esp, 0xc
cmp dword [ebp - 0x2118], eax
jle 0x413e28
mov ebx, dword [ebp - 0x2118]
mov edi, eax
test edi, edi
jns 0x413ddc
add edi, 1
sar edi, 1
movzx eax, word [ebp + eax*2 - 0x2004]
mov esi, dword [ebp - 0x2108]
push eax
call fcn.004142dc
mov edx, dword [ebp - 0x210c]
pop ecx
and edx, 1
shl edx, 2
push 4
pop ecx
sub ecx, edx
shl al, cl
or byte [edi + esi], al
mov eax, dword [ebp - 0x210c]
inc eax
mov dword [ebp - 0x210c], eax
cmp eax, ebx
jl 0x413dd3
mov ebx, dword [ebp - 0x211c]
xor edi, edi
mov esi, dword [ebp - 0x2110]
mov eax, dword [ebp - 0x2114]
push ebx
push dword [ebp - 0x2108]
push 3
push edi
push esi
push dword [eax]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edi, eax
lea eax, [ebp - 0x2104]
cmp dword [ebp - 0x2108], eax
je 0x413e71
lea ecx, [ebp - 0x2108]
call fcn.004152f3
jmp 0x413e71
push 1
lea eax, [ebp - 0x2004]
mov ecx, ebx
push eax
push esi
call fcn.00418b5f
mov edi, eax
test edi, edi
je 0x413e7e
push edi
call fcn.0041409c
pop ecx
jmp 0x413e97
mov edi, dword [ebp - 0x2120]
push dword [ebp - 0x2124]
mov ecx, edi
call fcn.004174cd
test eax, eax
js 0x413e97
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00522d04
leave
ret 0xc