Function at 0x51bf40
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x50
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x520280
mov esi, ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
lea ecx, [esi + 0x28]
mov dword fs:[0], eax
mov dword [ebp - 0x40], ecx
push ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 0x28], 7
mov dword [ebp - 0x2c], 0
mov word [ebp - 0x3c], 0
lea ebx, [ebp - 0x58]
mov dword [ebp - 0x5c], esi
mov edx, dword [esi + 0x20]
jmp 0x51bfae
push edx
push eax
call fcn.005d319e
add esp, 8
mov edx, dword [ebp - 0x20]
inc edx
mov ecx, dword [ebp - 0x5c]
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
sub ecx, eax
sar ecx, 3
imul ecx, ecx, 0xaaaaaaab
cmp edx, ecx
jae 0x51c0a5
lea ecx, [edx + edx*2]
mov dword [ebp - 0x20], edx
mov dword [ebp - 0x10], 3
lea eax, [eax + ecx*8]
push 0x67cf80
push eax
push ebx
call fcn.005dfd60
add esp, 0xc
mov eax, dword [ebp - 0x48]
cmp dword [ebp - 0x44], 7
lea edx, [ebp - 0x58]
mov ecx, edx
mov ebx, edx
jbe 0x51bffb
mov ecx, dword [ebp - 0x58]
mov edi, dword [ebp - 0x28]
mov edx, dword [ebp - 0x2c]
mov esi, edi
sub esi, edx
cmp esi, eax
jae 0x51c040
mov dword [ebp - 0x10], 4
sub esp, 0x10
movzx edx, byte [ebp - 0x24]
mov byte [esp + 4], dl
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x3c]
mov dword [esp + 0xc], eax
mov dword [esp], eax
call fcn.0040b010
lea ebx, [ebp - 0x58]
jmp 0x51c067
lea esi, [edx + eax]
cmp edi, 7
lea edi, [ebp - 0x3c]
mov dword [ebp - 0x2c], esi
jbe 0x51c051
mov edi, dword [ebp - 0x3c]
add eax, eax
lea edx, [edi + edx*2]
push eax
push ecx
push edx
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov ecx, dword [ebp - 0x44]
cmp ecx, 8
jb 0x51bfaa
mov eax, dword [ebp - 0x58]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51bfa0
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51c1ba
add ecx, ecx
add ecx, 0x25
mov edx, ecx
jmp 0x51bfa0
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x51c0ba
cmp dword [ebp - 0x28], 7
lea ecx, [eax - 1]
jbe 0x51c0cd
mov edx, dword [ebp - 0x3c]
jmp 0x51c0d0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x20], 0
jmp 0x51c156
lea edx, [ebp - 0x3c]
mov dword [ebp - 0x2c], ecx
mov word [edx + eax*2 - 2], 0
mov dword [ebp - 0x58], 0
cmp dword [ebp - 0x2c], 0
je 0x51c115
lea eax, [ebp - 0x58]
mov dword [ebp - 0x10], 3
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push 0x65b6e0
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x51c11e
mov dword [ebp - 0x20], 0
jmp 0x51c156
mov eax, dword [ebp - 0x2c]
add eax, eax
cmp dword [ebp - 0x28], 7
jbe 0x51c12e
mov ecx, dword [ebp - 0x3c]
jmp 0x51c131
lea ecx, [ebp - 0x3c]
push eax
push ecx
push 1
push 0
push 0x67d700
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete al
mov dword [ebp - 0x20], eax
push dword [ebp - 0x58]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x28]
cmp ecx, 8
jb 0x51c194
mov eax, dword [ebp - 0x3c]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51c183
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51c1c6
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov dword [ebp - 0x10], 2
mov dword [ebp - 0x10], 2
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, dword [ebp - 0x20]
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret 4
mov dword [ebp - 0x10], 0
call fcn.006207e0
mov dword [ebp - 0x10], 1
call fcn.006207e0
nop word cs:[eax + eax]
nop dword [eax]
push ebp
sub esp, 0x24
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x24
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x24
add ebp, 0xc
call fcn.0061de80
nop dword [eax]
push ebp
sub esp, 0x24
add ebp, 0xc
mov ecx, dword [ebp - 0x44]
cmp ecx, 8
jb 0x51c24e
mov eax, dword [ebp - 0x58]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51c244
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51c267
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x44], 7
mov word [ebp - 0x58], 0
add esp, 0x24
pop ebp
ret
call fcn.006207e0
nop dword [eax]
push ebp
sub esp, 0x24
add ebp, 0xc
mov ecx, dword [ebp - 0x28]
cmp ecx, 8
jb 0x51c2ae
mov eax, dword [ebp - 0x3c]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51c2a4
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51c2bc
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
push dword [ebp - 0x40]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add esp, 0x24
pop ebp
ret
call fcn.006207e0
int3