Function at 0x10087730
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff0
push 0xffffffffffffffff
push 0x1009c8cc
mov eax, dword fs:[0]
push eax
sub esp, 0x47c
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x474], eax
push esi
push edi
mov eax, dword [section..data]
xor eax, esp
push eax
lea eax, [esp + 0x488]
mov dword fs:[0], eax
mov edi, ecx
mov eax, dword [ebp + 0xc]
xorps xmm0, xmm0
mov dword [esp + 0x10], eax
xor eax, eax
mov dword [esp + 0x1c], eax
movsd qword [esp + 0x24], xmm0
mov dword [esp + 0x2c], eax
mov dword [esp + 0x490], eax
mov esi, dword [0x100f5084]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], esi
push 0x430
push eax
lea eax, [esp + 0x54]
push eax
call sub.MSVCR120.dll_memset
add esp, 0xc
mov dword [esp + 0x4c], vtable.CHncRegistry.0
mov dword [esp + 0x50], 0
mov dword [esp + 0x54], 0
mov dword [esp + 0x58], 0
mov dword [esp + 0x46c], 0
mov dword [esp + 0x470], 0
mov dword [esp + 0x474], 0
mov dword [esp + 0x478], 0
lea ecx, [esp + 0x1c]
mov byte [esp + 0x490], 3
mov eax, dword [edi]
push ecx
push dword [ebp + 8]
push edi
call dword [eax + 0x20]
test eax, eax
jne 0x10087820
xor edi, edi
jmp 0x10087969
mov eax, dword [edi]
push edi
call dword [eax + 0xc]
mov ecx, dword [esp + 0x10]
test ecx, ecx
push eax
mov eax, dword [0x100fdc48]
cmovne eax, ecx
push eax
lea eax, [esp + 0x20]
push str._s_08X
push eax
call sym.HncFoundation.dll_public:_int___cdecl_CHncStringW::Format_unsigned_short_int_const__
push dword [ebp + 8]
lea eax, [esp + 0x28]
push str._08X
push eax
call sym.HncFoundation.dll_public:_int___cdecl_CHncStringW::Format_unsigned_short_int_const__
mov esi, dword [esp + 0x34]
add esp, 0x1c
test esi, esi
je 0x1008787e
push esi
lea eax, [esp + 0x60]
push 0x208
push eax
call dword [sym.imp.MSVCR120.dll_wcscpy_s]
add esp, 0xc
mov dword [esp + 0x50], SysReAllocString
mov dx, word [esp + 0x1c]
movzx eax, dx
cmp eax, 1
je 0x100878c5
add eax, 0xffff8000
cmp eax, 2
ja 0x1008789c
xor edi, edi
jmp 0x10087969
mov eax, dword [esp + 0x1c]
xor ecx, ecx
add eax, 0xfffffffe
cmp ax, 7
cmovbe ecx, dword [esp + 0x24]
push ecx
push dword [esp + 0x18]
lea ecx, [esp + 0x54]
push 0
call sym.HncFoundation.dll_public:_int___thiscall_CHncRegistry::WriteDwordValue_unsigned_short_int_const___unsigned_short_int_const___int_
mov edi, eax
jmp 0x10087969
mov edi, 0x100a4cdc
cmp dx, 1
mov ecx, edi
cmove ecx, dword [esp + 0x24]
lea eax, [ecx + 2]
mov dword [esp + 0x10], eax
lea esp, [esp]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x100878e0
sub ecx, dword [esp + 0x10]
sar ecx, 1
cmp dx, 1
cmove edi, dword [esp + 0x24]
lea eax, [ecx*2 + 2]
lea ecx, [esp + 0x4c]
mov dword [esp + 0x10], eax
call sym.HncFoundation.dll_protected:_struct_HKEY______thiscall_CHncRegistry::GetRegistryKey_void_
mov dword [esp + 0x18], eax
test eax, eax
jne 0x1008791a
xor edi, edi
jmp 0x10087969
push dword [esp + 0x10]
xorps xmm0, xmm0
lea ecx, [esp + 0x40]
push edi
push 3
push 0
push dword [esp + 0x24]
movdqa xmmword [esp + 0x48], xmm0
push eax
mov dword [esp + 0x50], ecx
mov dword [esp + 0x4c], 0
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
lea ecx, [esp + 0x34]
mov edi, eax
call fcn.10010900
push dword [esp + 0x18]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
xor eax, eax
test edi, edi
sete al
mov dword [esp + 0x10], eax
mov edi, eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x4c], vtable.CHncRegistry.0
test eax, eax
je 0x10087980
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [esp + 0x470]
mov ecx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
test eax, eax
je 0x100879a8
push eax
call ecx
mov ecx, dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
mov dword [esp + 0x470], 0
mov edx, dword [esp + 0x14]
or eax, 0xffffffff
add edx, 0xfffffff4
cmp dword [edx], 0xfffffffe
je 0x100879c9
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x100879c6
push edx
call ecx
add esp, 4
or eax, 0xffffffff
add esi, 0xfffffff4
cmp dword [esi], 0xfffffffe
je 0x100879e4
lock xadd dword [esi], eax
dec eax
test eax, eax
jg 0x100879e4
push esi
call dword [sym.imp.MSVCR120.dll_void___cdecl_operator_delete___void__]
add esp, 4
lea ecx, [esp + 0x1c]
mov dword [esp + 0x490], 0xffffffff
call sym.HncFoundation.dll_public:_void___thiscall_tagHNCPARAM::ParamClear_void_
mov eax, edi
mov ecx, dword [esp + 0x488]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [esp + 0x474]
xor ecx, esp
call fcn.100944ae
mov esp, ebp
pop ebp
ret 0xc