Function at 0x10004d20
Capabilities:
Delete registry key
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x1001cff8
mov eax, dword fs:[0]
push eax
sub esp, 0x14
push ebx
push ebp
push esi
push edi
mov eax, dword [0x10025814]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
cmp dword [esi + 0x54], 8
mov byte [esp + 0x17], 0
jb 0x10004d59
mov eax, dword [esi + 0x40]
jmp 0x10004d5c
lea eax, [esi + 0x40]
push eax
lea ecx, [esp + 0x24]
call fcn.10003620
mov edx, dword [esi + 0x20]
mov dword [esp + 0x30], 0
test edx, edx
jne 0x10004d79
xor eax, eax
jmp 0x10004d8f
mov eax, edx
lea edi, [eax + 2]
mov edi, edi
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x10004d80
sub eax, edi
sar eax, 1
push eax
push edx
lea ecx, [esp + 0x28]
call fcn.10002440
mov ebx, dword [esp + 0x40]
mov edx, dword [esp + 0x20]
lea eax, [esp + 0x1c]
push eax
mov ecx, ebx
or ecx, 0x20019
push ecx
push 0
push edx
push VariantInit
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10004f21
mov ecx, esi
call fcn.10004960
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0x1c]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegDeleteKeyW]
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0x1c]
lea edx, [esp + 0x18]
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
mov edx, dword [esi + 0x68]
sub edx, dword [esi + 0x64]
xor edi, edi
sar edx, 2
test edx, edx
jbe 0x10004e7a
xor ebx, ebx
mov ecx, dword [esi + 0x80]
sub ecx, dword [esi + 0x7c]
mov eax, 0x2aaaaaab
imul ecx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp edi, eax
jb 0x10004e24
call fcn.1000f6aa
mov ebp, dword [esi + 0x7c]
mov ecx, dword [ebp + ebx + 0x10]
add ebp, ebx
sub ecx, dword [ebp + 0xc]
jne 0x10004e37
call fcn.1000f6aa
mov edx, dword [esi + 0x68]
sub edx, dword [esi + 0x64]
mov ebp, dword [ebp + 0xc]
sar edx, 2
cmp edi, edx
jb 0x10004e4c
call fcn.1000f6aa
mov eax, dword [esi + 0x64]
mov eax, dword [eax + edi*4]
mov ecx, dword [esp + 0x18]
push 0x18
push ebp
push 3
push 0
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esi + 0x68]
sub edx, dword [esi + 0x64]
inc edi
sar edx, 2
add ebx, 0x18
cmp edi, edx
jb 0x10004e01
mov ebx, dword [esp + 0x40]
mov edi, dword [esp + 0x38]
cmp dword [edi + 0x18], 8
jb 0x10004e89
mov eax, dword [edi + 4]
jmp 0x10004e8c
lea eax, [edi + 4]
mov ecx, dword [esp + 0x3c]
mov edx, dword [esp + 0x18]
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
push 0x18
push ecx
push 3
push 0
push eax
push edx
call ebp
test eax, eax
jne 0x10004ec5
push ebx
push edi
mov ecx, esi
call fcn.10003890
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [esp + 0x17], al
mov eax, dword [esp + 0x18]
push eax
call edi
jmp 0x10004ecb
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edx, dword [esi + 0x34]
lea ecx, [esp + 0x24]
push ecx
or ebx, 0x2001f
push ebx
push 0
push edx
push VariantInit
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x10004f1a
mov ecx, dword [esi + 0x38]
mov edx, dword [esp + 0x18]
push 4
lea eax, [esp + 0x44]
push eax
push 4
push 0
push ecx
push edx
mov dword [esp + 0x58], 0x10000
call ebp
test eax, eax
je 0x10004f13
mov byte [esp + 0x17], 0
mov eax, dword [esp + 0x18]
push eax
call edi
mov ecx, dword [esp + 0x1c]
push ecx
call edi
mov eax, dword [esp + 0x20]
add eax, 0xfffffff0
mov dword [esp + 0x30], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x10004f49
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov al, byte [esp + 0x17]
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0xc