Function at 0x522420
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59a7a8
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x1c
mov eax, dword [ebp + 0xc]
push ebx
push esi
xor esi, esi
cmp eax, esi
push edi
je 0x522478
lea ecx, [ebp + 0x14]
lea edx, [ebp + 0xc]
push ecx
mov ecx, dword [ebp + 0x14]
push edx
mov edx, dword [ebp + 8]
or ecx, 0x20006
push esi
push ecx
push esi
push esi
push esi
push eax
push edx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
mov ecx, dword [ebp + 0xc]
neg eax
sbb eax, eax
not eax
and eax, ecx
mov dword [ebp + 0x14], eax
jmp 0x52247e
mov eax, dword [ebp + 8]
mov dword [ebp + 0x14], eax
cmp eax, esi
je 0x52273a
call fcn.0048b040
test eax, eax
je 0x5225d5
mov esi, dword [ebp + 0x18]
mov ebx, 2
xor edi, edi
mov dword [ebp + 0xc], ebx
mov eax, dword [esi + 4]
test eax, eax
jle 0x5224d2
lea ecx, [ebp + 0x18]
push edi
push ecx
mov ecx, esi
call fcn.0043da00
mov edx, dword [eax]
mov eax, dword [edx - 8]
lea ecx, [ebx + eax*2 + 2]
mov dword [ebp + 0xc], ecx
lea ecx, [ebp + 0x18]
call fcn.0042d270
mov eax, dword [esi + 4]
mov ebx, dword [ebp + 0xc]
inc edi
cmp edi, eax
jl 0x5224a7
push ebx
call fcn.0057985d
mov edx, eax
add esp, 4
test edx, edx
mov dword [ebp + 0x18], edx
je 0x52273a
mov ecx, ebx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
xor ebx, ebx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [esi + 4]
mov edi, edx
test eax, eax
jle 0x52253d
lea edx, [ebp - 0x14]
push ebx
push edx
mov ecx, esi
call fcn.0043da00
mov eax, dword [eax]
push eax
push edi
call fcn.00414e49
add esp, 8
lea ecx, [ebp - 0x14]
call fcn.0042d270
push edi
call fcn.00414e6e
add esp, 4
lea edi, [edi + eax*2 + 2]
mov eax, dword [esi + 4]
inc ebx
cmp ebx, eax
jl 0x522505
mov edx, dword [ebp + 0x18]
mov ebx, dword [ebp + 0x10]
test ebx, ebx
jne 0x522548
xor edi, edi
jmp 0x522578
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov esi, eax
inc esi
lea eax, [esi + esi]
add eax, 3
and al, 0xfc
call fcn.00413cb0
mov edi, esp
push esi
push edi
push 0xffffffffffffffff
push ebx
push 0
push 0
mov word [edi], 0
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov edx, dword [ebp + 0x18]
mov ecx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x14]
push ecx
push edx
push 7
push 0
push edi
push esi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x5225b2
cmp esi, dword [ebp + 8]
je 0x52259c
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [ebp + 0x18]
push edx
call fcn.00579886
add esp, 4
mov eax, 1
jmp 0x52273c
mov eax, dword [ebp + 0x18]
push eax
call fcn.00579886
mov eax, dword [ebp + 8]
add esp, 4
cmp esi, eax
je 0x52273a
push esi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x52273a
lea ecx, [ebp - 0x28]
call fcn.004322b0
mov edi, dword [ebp + 0x18]
mov dword [ebp - 4], esi
mov eax, dword [edi + 4]
test eax, eax
jle 0x522635
lea ecx, [ebp - 0x18]
push esi
push ecx
mov ecx, edi
call fcn.0043da00
mov eax, dword [eax]
lea ecx, [ebp - 0x10]
push eax
mov byte [ebp - 4], 1
call fcn.004270f0
lea ecx, [ebp - 0x18]
mov byte [ebp - 4], 3
call fcn.0042d270
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x10]
push edx
push eax
lea ecx, [ebp - 0x28]
call fcn.00432a00
lea ecx, [ebp - 0x10]
mov byte [ebp - 4], 0
call fcn.00427900
mov eax, dword [edi + 4]
inc esi
cmp esi, eax
jl 0x5225ea
mov edx, dword [ebp - 0x24]
mov edi, 1
test edx, edx
mov dword [ebp + 0x18], edi
jle 0x52265b
mov eax, dword [ebp - 0x28]
mov ecx, dword [eax]
add eax, 4
dec edx
mov ecx, dword [ecx - 8]
lea ecx, [edi + ecx + 1]
mov dword [ebp + 0x18], ecx
mov edi, ecx
jne 0x522647
push edi
call fcn.0057985d
mov esi, eax
add esp, 4
test esi, esi
mov dword [ebp + 0xc], esi
je 0x52272b
mov ecx, edi
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
xor ebx, ebx
and ecx, 3
mov edx, esi
rep stosb byte es:[edi], al
mov eax, dword [ebp - 0x24]
test eax, eax
jle 0x5226ce
mov eax, dword [ebp - 0x28]
or ecx, 0xffffffff
mov edi, dword [eax + ebx*4]
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov eax, dword [ebp - 0x24]
not ecx
dec ecx
inc ebx
cmp ebx, eax
lea edx, [edx + ecx + 1]
jl 0x522690
mov esi, dword [ebp + 0xc]
mov ecx, dword [ebp + 0x18]
mov edx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x14]
push ecx
push esi
push 7
push 0
push edx
push edi
call dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
test eax, eax
jne 0x522714
cmp edi, dword [ebp + 8]
je 0x5226f5
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push esi
call fcn.00579886
add esp, 4
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.004322c0
mov eax, 1
jmp 0x52273c
push esi
call fcn.00579886
mov eax, dword [ebp + 8]
add esp, 4
cmp edi, eax
je 0x52272b
push edi
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [ebp - 0x28]
mov dword [ebp - 4], 0xffffffff
call fcn.004322c0
xor eax, eax
mov ecx, dword [ebp - 0xc]
lea esp, [ebp - 0x34]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret