Function at 0x450170
Capabilities:
Access peb ldr_data
Get process heap flags
Get process heap force flags
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4d89a0
mov eax, dword fs:[0]
push eax
sub esp, 0x18
push ebx
push esi
push edi
mov eax, dword [0x513330]
xor eax, esp
push eax
lea eax, [esp + 0x28]
mov dword fs:[0], eax
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], ebx
mov eax, dword [0x51856c]
mov edx, dword [eax + 0xc]
mov ecx, 0x51856c
call edx
add eax, 0x10
mov dword [esp + 0x20], eax
mov byte [esp + 0x30], 1
mov eax, dword [esi + 8]
mov dword [esp + 0x1c], eax
lea eax, [esi + 0xc]
lea edi, [esp + 0x20]
call fcn.004082a0
mov edi, dword [esp + 0x20]
cmp dword [edi - 0xc], ebx
jne 0x45021a
lea eax, [edi - 0x10]
mov byte [esp + 0x30], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x450203
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor al, al
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov esi, dword [esp + 0x1c]
lea ecx, [esp + 0x10]
push ecx
push 0x20006
push ebx
push edi
push esi
mov dword [esp + 0x24], ebx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
cmp eax, ebx
jne 0x4502c4
mov edx, dword [esp + 0x10]
mov dword [esp + 0x14], edx
mov dword [esp + 0x18], ebx
mov esi, dword [ebp + 0xc]
xor eax, eax
cmp esi, ebx
setne al
cmp eax, ebx
je 0x45027e
push esi
call dword [sym.imp.KERNEL32.dll_lstrlenW]
mov edx, dword [ebp + 8]
lea ecx, [eax + eax + 2]
mov eax, dword [esp + 0x14]
push ecx
push esi
push 1
push ebx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
cmp eax, ebx
je 0x45031e
add edi, 0xfffffff0
mov byte [esp + 0x30], bl
lea ecx, [edi + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45029e
mov ecx, dword [edi]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
push edi
call edx
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x450307
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
push esi
mov edx, edi
lea esi, [esp + 0x18]
call fcn.00403bd0
test eax, eax
je 0x450249
lea eax, [edi - 0x10]
mov byte [esp + 0x30], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4502f8
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x450307
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor al, al
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
lea eax, [edi - 0x10]
mov byte [esp + 0x30], bl
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45033e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0x14]
cmp eax, ebx
je 0x45034d
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov al, 1
mov ecx, dword [esp + 0x28]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8