Function at 0x51aaa0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x64
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x520230
mov esi, ecx
mov edi, dword [ebp + 0x14]
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
add esi, 0x28
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp dword [edi + 0x10], 0
je 0x51ab59
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x10], 2
lea ecx, [ebp - 0x70]
push 0x20019
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.004098d0
cmp dword [ebp - 0x70], 0
mov eax, dword [ebp + 0x14]
je 0x51ab72
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x50], 7
mov dword [ebp - 0x54], 0
mov word [ebp - 0x64], 0
mov dword [ebp - 0x2c], 0
mov ecx, eax
mov esi, dword [eax + 0x10]
cmp dword [eax + 0x14], 7
jbe 0x51ab37
mov ecx, dword [eax]
cmp esi, 7
ja 0x51ab81
movsd xmm0, qword [ecx]
movsd xmm1, qword [ecx + 8]
mov eax, 7
movsd qword [ebp - 0x38], xmm1
movsd qword [ebp - 0x40], xmm0
jmp 0x51ac00
mov dword [ebp - 0x20], 0
cmp byte [0x6d27fc], 0
je 0x51addf
jmp 0x51aded
mov esi, dword [ebp - 0x4c]
mov dword [ebp - 0x20], 0
jmp 0x51adce
mov eax, esi
mov dword [ebp - 0x28], ecx
mov ecx, 0x7ffffffe
mov dword [ebp - 0x20], esi
or eax, 7
cmp eax, 0x7ffffffe
mov dword [ebp - 0x44], eax
cmovb ecx, eax
lea eax, [ecx + ecx]
cmp ecx, 0x7ff
jb 0x51abd3
cmp ecx, 0x7fffffee
jae 0x51afff
add eax, 0x25
mov dword [ebp - 0x10], 3
push eax
call fcn.005d0220
add esp, 4
mov ecx, eax
add eax, 0x23
and eax, 0xffffffe0
mov dword [eax - 4], ecx
jmp 0x51abe6
add eax, 2
mov dword [ebp - 0x10], 3
push eax
call fcn.005d0220
add esp, 4
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x40], eax
lea ecx, [esi + esi + 2]
push ecx
push dword [ebp - 0x28]
push eax
call fcn.0061e340
add esp, 0xc
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x2c], eax
lea eax, [ebp - 0x64]
mov dword [ebp - 0x10], 4
lea ecx, [ebp - 0x70]
mov dword [ebp - 0x20], eax
push eax
push dword [ebp + 0x10]
call fcn.004075a0
test eax, eax
je 0x51ac6a
cmp dword [ebp - 0x30], 0
mov dword [ebp - 0x24], 0
je 0x51ac5e
lea eax, [ebp - 0x24]
mov dword [ebp - 0x10], 4
push 0
push eax
push 0
push 0x20006
push 0
push 0
push 0
push dword [ebp + 0xc]
push dword [ebp + 8]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
je 0x51ad1e
mov dword [ebp - 0x20], 0
jmp 0x51ad55
cmp byte [0x6d27fc], 1
jne 0x51acdb
mov edx, dword [ebp - 0x54]
test edx, edx
je 0x51acdb
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx + 0x10]
cmp dword [ecx + 0x14], 7
mov dword [ebp - 0x28], ecx
jbe 0x51ac8e
mov ecx, dword [ecx]
mov dword [ebp - 0x28], ecx
cmp dword [ebp - 0x50], 7
jbe 0x51ac9a
mov ecx, dword [ebp - 0x64]
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x44], edx
sub edx, eax
jae 0x51ae27
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x44]
cmp eax, esi
jae 0x51ae88
mov dword [ebp - 0x10], 4
sub esp, 0xc
mov al, byte [ebp - 0x24]
lea ecx, [ebp - 0x40]
mov byte [esp + 4], al
mov dword [esp], esi
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], eax
call fcn.00405590
jmp 0x51aeae
lea edi, [ebp - 0x40]
cmp edi, dword [ebp + 0x14]
je 0x51ac23
mov ecx, dword [ebp + 0x14]
mov esi, dword [ecx + 0x10]
cmp dword [ecx + 0x14], 7
jbe 0x51acf5
mov ecx, dword [ecx]
mov eax, dword [ebp - 0x2c]
cmp eax, esi
jae 0x51ae11
sub esp, 0xc
mov al, byte [ebp - 0x24]
mov byte [esp + 4], al
mov dword [esp + 8], ecx
lea ecx, [ebp - 0x40]
mov dword [esp], esi
call fcn.00405590
jmp 0x51ac23
mov eax, dword [ebp - 0x30]
add eax, eax
cmp dword [ebp - 0x2c], 7
jbe 0x51ad2e
mov ecx, dword [ebp - 0x40]
jmp 0x51ad31
lea ecx, [ebp - 0x40]
mov edx, dword [ebp + 0x10]
push eax
push ecx
push 1
push 0
push edx
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
sete al
mov dword [ebp - 0x20], eax
push dword [ebp - 0x24]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x4c]
cmp ecx, 8
jb 0x51ad93
mov eax, dword [ebp - 0x40]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51ad89
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51b00b
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov ecx, dword [ebp - 0x50]
cmp ecx, 8
jb 0x51adce
mov eax, dword [ebp - 0x64]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51adc4
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51b017
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea ecx, [ebp - 0x70]
call fcn.004080a0
cmp byte [0x6d27fc], 0
jne 0x51aded
mov byte [0x6d27fc], 1
mov dword [ebp - 0x10], 5
mov dword [ebp - 0x10], 5
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, dword [ebp - 0x20]
add esp, 0x64
pop esi
pop edi
pop ebx
pop ebp
ret 0x10
cmp eax, 7
jbe 0x51ae19
mov edi, dword [ebp - 0x40]
lea eax, [esi + esi]
mov dword [ebp - 0x30], esi
push eax
push ecx
push edi
jmp 0x51af6a
test eax, eax
je 0x51afdd
mov ecx, dword [ebp - 0x20]
lea edx, [ecx + edx*2 + 2]
mov dword [ebp - 0x48], edx
sub edx, ecx
je 0x51af8e
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x28]
movzx ebx, word [ecx]
sar edx, 1
cmp word [edi], bx
je 0x51ae5f
add edi, 2
dec edx
jne 0x51ae4f
jmp 0x51af85
mov edx, 1
cmp eax, edx
je 0x51af7d
movzx ecx, word [edi + edx*2]
cmp cx, word [esi + edx*2]
lea edx, [edx + 1]
je 0x51ae64
mov edx, dword [ebp - 0x48]
add edi, 2
sub edx, edi
jne 0x51ae4d
jmp 0x51af85
cmp eax, 7
jbe 0x51ae92
mov edi, dword [ebp - 0x40]
jmp 0x51ae95
lea edi, [ebp - 0x40]
lea eax, [esi + esi]
mov dword [ebp - 0x30], esi
push eax
push dword [ebp - 0x20]
push edi
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
mov eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x2c]
cmp ecx, eax
jne 0x51aeea
mov dword [ebp - 0x10], 4
sub esp, 0x10
mov al, byte [ebp - 0x24]
lea ecx, [ebp - 0x40]
mov byte [esp + 4], al
mov dword [esp + 0xc], 1
mov dword [esp + 8], 0x67cf80
mov dword [esp], 1
call fcn.0040b010
jmp 0x51af0a
lea edx, [eax + 1]
cmp ecx, 7
mov dword [ebp - 0x30], edx
jbe 0x51aefa
mov ecx, dword [ebp - 0x40]
jmp 0x51aefd
lea ecx, [ebp - 0x40]
mov word [ecx + eax*2], 0x7c
mov word [ecx + eax*2 + 2], 0
mov ebx, dword [ebp + 0x14]
mov eax, dword [ebx + 0x10]
cmp dword [ebx + 0x14], 7
jbe 0x51af18
mov ebx, dword [ebx]
mov edx, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x30]
mov esi, edx
sub esi, ecx
cmp esi, eax
jae 0x51af4f
mov dword [ebp - 0x10], 4
sub esp, 0x10
mov cl, byte [ebp - 0x24]
mov byte [esp + 4], cl
lea ecx, [ebp - 0x40]
mov dword [esp + 0xc], eax
mov dword [esp + 8], ebx
mov dword [esp], eax
call fcn.0040b010
jmp 0x51ac23
lea esi, [ecx + eax]
cmp edx, 7
mov dword [ebp - 0x30], esi
jbe 0x51af5f
mov edi, dword [ebp - 0x40]
jmp 0x51af62
lea edi, [ebp - 0x40]
add eax, eax
lea ecx, [edi + ecx*2]
push eax
push ebx
push ecx
call fcn.0061e340
add esp, 0xc
mov word [edi + esi*2], 0
jmp 0x51ac23
sub edi, dword [ebp - 0x20]
cmp edi, 0xfffffffe
jne 0x51afdd
cmp dword [ebp - 0x44], eax
jb 0x51aca5
mov edx, dword [ebp - 0x48]
sub edx, dword [ebp - 0x20]
je 0x51aca5
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
mov esi, dword [ebp - 0x28]
movzx ebx, word [ecx]
sar edx, 1
cmp word [edi], bx
je 0x51afb8
add edi, 2
dec edx
jne 0x51afa8
jmp 0x51aca5
mov edx, 1
cmp eax, edx
je 0x51afee
movzx ecx, word [edi + edx*2]
cmp cx, word [esi + edx*2]
lea edx, [edx + 1]
je 0x51afbd
mov edx, dword [ebp - 0x48]
add edi, 2
sub edx, edi
jne 0x51afa6
jmp 0x51aca5
mov al, 1
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x20], eax
jmp 0x51ad55
sub edi, dword [ebp - 0x20]
cmp edi, 0xfffffffe
jne 0x51ac23
jmp 0x51aca5
mov dword [ebp - 0x10], 3
call fcn.005e8c60
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
mov ecx, dword [ebp - 0x2c]
cmp ecx, 8
jb 0x51b08e
mov eax, dword [ebp - 0x40]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51b084
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51b0a7
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x2c], 7
mov word [ebp - 0x40], 0
add esp, 0x24
pop ebp
ret
call fcn.006207e0
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 - 0x50]
cmp ecx, 8
jb 0x51b0fe
mov eax, dword [ebp - 0x64]
lea edx, [ecx + ecx + 2]
cmp edx, 0x1000
jb 0x51b0f4
mov edx, eax
mov eax, dword [eax - 4]
add edx, 0xfffffffc
sub edx, eax
cmp edx, 0x20
jae 0x51b10b
add ecx, ecx
add ecx, 0x25
mov edx, ecx
push edx
push eax
call fcn.005d319e
add esp, 8
lea ecx, [ebp - 0x70]
call fcn.004080a0
add esp, 0x24
pop ebp
ret
call fcn.006207e0
push ebp
sub esp, 0x24
add ebp, 0xc
push dword [ebp - 0x4c]
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
add esp, 0x24
pop ebp
ret