Function at 0x4596a0
Capabilities:
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4f1a5b
mov eax, dword fs:[0]
push eax
sub esp, 0x23c
mov eax, dword [0x533014]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x22c], ecx
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [ebp - 0x230], eax
mov dword [ebp - 0x220], ebx
call fcn.0041b6a0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x459702
lock inc dword [eax + 0x14]
lea esi, [eax + 8]
jmp 0x459708
mov ecx, eax
call edx
mov esi, eax
add esi, 0x10
mov dword [ebp - 0x240], esi
mov dword [ebp - 4], 0
call fcn.0041b6a0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x459733
lock inc dword [eax + 0x14]
add eax, 8
jmp 0x459737
mov ecx, eax
call edx
lea ecx, [eax + 0x10]
mov dword [ebp - 0x244], eax
mov dword [ebp - 0x248], ecx
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
mov dword [ebp - 0x234], 0
push 0x208
lea eax, [ebp - 0x218]
mov byte [ebp - 4], 2
push 0
push eax
call fcn.00487ab0
add esp, 0xc
mov dword [ebp - 0x220], 0x104
call fcn.00458580
mov ecx, 0x600
cmp ax, cx
jb 0x4599c6
call fcn.00458580
mov ecx, 0xa00
cmp ax, cx
jae 0x4599c6
mov dword [ebp - 0x228], 0
lea eax, [ebp - 0x228]
mov byte [ebp - 4], 3
push eax
push str._n_vSN
push 3
push 0
push 0x503020
call dword [sym.imp.ole32.dll_CoCreateInstance]
test eax, eax
jne 0x4598cc
call fcn.0041b6a0
mov ecx, dword [eax]
mov edx, dword [ecx + 0xc]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x4597fa
lock inc dword [eax + 0x14]
add eax, 8
jmp 0x4597fe
mov ecx, eax
call edx
add eax, 0x10
mov dword [ebp - 0x224], eax
cmp byte [ebp + 0xc], 0
lea ecx, [ebp - 0x23c]
mov byte [ebp - 4], 4
je 0x4598a8
mov ebx, dword [ebp - 0x22c]
sub esp, 0x14
push dword [ebx]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598c1
mov eax, dword [ebp - 0x228]
lea edx, [ebp - 0x220]
push edx
push 1
push 0
push dword [ebx]
mov ecx, dword [eax]
push eax
call dword [ecx + 0xc]
test eax, eax
js 0x459892
sub esp, 0x14
lea ecx, [ebp - 0x23c]
push dword [edi]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598c1
push 1
push dword [ebp - 0x220]
lea ecx, [ebp - 0x23c]
push str.PreviousRegistration
call fcn.0045b3a0
push dword [ebp - 0x220]
call dword [sym.imp.ole32.dll_CoTaskMemFree]
push dword [ebp - 0x230]
lea ecx, [ebp - 0x224]
call fcn.004144a0
jmp 0x459983
push 0x2001f
push dword [edi]
push 0x80000000
call fcn.0041b7b0
test eax, eax
je 0x459949
lea ecx, [ebp - 0x224]
call fcn.00414500
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x4598e0
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
xor edi, edi
mov eax, dword [ebp - 0x23c]
test eax, eax
je 0x4598f3
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x244]
or ebx, 0xffffffff
mov byte [ebp - 4], 0
mov eax, ebx
lock xadd dword [ecx + 0xc], eax
dec eax
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
test eax, eax
jg 0x459c07
mov ecx, dword [ecx]
push dword [ebp - 0x244]
mov eax, dword [ecx]
mov edx, dword [eax + 4]
mov dword [ebp - 0x220], edx
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
cmp eax, vtable.ATL::CAtlStringMgr.0
jne 0x459bfb
mov eax, dword [ecx + 4]
push 0
push dword [eax + 4]
call edx
jmp 0x459c01
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
push str.PreviousRegistration
lea ecx, [ebp - 0x23c]
call fcn.0045b210
test eax, eax
jne 0x45997d
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x224]
call fcn.00414450
mov ebx, dword [ebp - 0x22c]
mov eax, dword [ebp - 0x228]
push 0
push dword [ebx]
push dword [ebp - 0x224]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x18]
lea ecx, [ebp - 0x224]
call fcn.00414500
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x228]
test eax, eax
je 0x459bf1
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov edi, 1
jmp 0x4598e2
sub esp, 0x14
lea ecx, [ebp - 0x23c]
cmp byte [ebp + 0xc], 0
je 0x459b0c
mov eax, dword [ebp - 0x22c]
push dword [eax]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598e0
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
push 0
lea ecx, [ebp - 0x23c]
call fcn.0045b210
test eax, eax
jne 0x459a4f
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.004145e0
mov byte [ebp - 4], 5
mov ebx, 1
mov ecx, eax
mov dword [ebp - 0x220], ebx
call fcn.0045ac90
mov ecx, eax
call fcn.0045abe0
mov byte [ebp - 0x219], bl
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x459a56
mov byte [ebp - 0x219], 0
mov dword [ebp - 4], 2
test bl, 1
je 0x459a6d
lea ecx, [ebp - 0x230]
call fcn.00414500
cmp byte [ebp - 0x219], 0
je 0x459a8e
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x240]
call fcn.00414450
mov esi, dword [ebp - 0x240]
mov edx, dword [edi]
test edx, edx
je 0x4598e0
mov ecx, edx
lea ebx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x459aa0
sub ecx, ebx
sar ecx, 1
lea eax, [ecx*2 + 2]
push eax
push edx
push 1
push 0
push 0
push dword [ebp - 0x23c]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x4598e0
sub esp, 0x14
lea ecx, [ebp - 0x23c]
push dword [edi]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598e0
push 1
push esi
push str.PreviousRegistration
lea ecx, [ebp - 0x23c]
call fcn.0045b3a0
mov edi, 1
jmp 0x4598e2
push dword [edi]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598e0
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x218]
push eax
push str.PreviousRegistration
lea ecx, [ebp - 0x23c]
call fcn.0045b210
test eax, eax
jne 0x459b80
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x230]
call fcn.004145e0
mov byte [ebp - 4], 6
mov ebx, 2
mov ecx, eax
mov dword [ebp - 0x220], ebx
call fcn.0045ac90
mov ecx, eax
call fcn.0045abe0
mov byte [ebp - 0x219], 1
mov eax, dword [eax]
cmp dword [eax - 0xc], 0
jne 0x459b87
mov byte [ebp - 0x219], 0
mov dword [ebp - 4], 2
test bl, 2
je 0x459b9e
lea ecx, [ebp - 0x230]
call fcn.00414500
cmp byte [ebp - 0x219], 0
je 0x459bbf
lea eax, [ebp - 0x218]
push eax
lea ecx, [ebp - 0x240]
call fcn.00414450
mov esi, dword [ebp - 0x240]
mov eax, dword [ebp - 0x22c]
lea ecx, [ebp - 0x23c]
sub esp, 0x14
push dword [eax]
push 0x80000000
call fcn.0045b320
test eax, eax
jne 0x4598e0
push 1
push esi
push eax
lea ecx, [ebp - 0x23c]
call fcn.0045b3a0
mov edi, 1
jmp 0x4598e2
call dword [ebp - 0x220]
mov edx, dword [sym.imp.KERNEL32.dll_HeapFree]
mov dword [ebp - 4], 0xffffffff
add esi, 0xfffffff0
lock xadd dword [esi + 0xc], ebx
dec ebx
test ebx, ebx
jg 0x459c3b
mov eax, dword [esi]
push esi
mov ecx, dword [eax]
mov ebx, dword [ecx + 4]
cmp ecx, vtable.ATL::CAtlStringMgr.0
jne 0x459c37
mov ecx, dword [eax + 4]
push 0
push dword [ecx + 4]
call edx
jmp 0x459c3b
mov ecx, eax
call ebx
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0046370d
mov esp, ebp
pop ebp
ret