Function at 0x4046d0
Capabilities:
Persist via run registry key
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4164c8
mov eax, dword fs:[0]
push eax
sub esp, 0x5c
mov eax, dword [0x41f008]
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 esi, ecx
mov dword [ebp - 0x14], esi
mov ebx, dword [ebp + 0xc]
xor eax, eax
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x18], 7
mov dword [ebp - 0x1c], 0
mov word [ebp - 0x2c], ax
cmp byte [ebp + 0x10], 1
mov dword [ebp - 4], eax
mov dword [ebp - 0x60], eax
lea eax, [ebp - 0x60]
push eax
jne 0x404735
push 0xf013f
jmp 0x40473a
push 0xf003f
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x404786
lea eax, [ebp - 0x60]
push eax
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push 0x80000002
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyW]
test eax, eax
je 0x404786
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.00401220
mov ecx, dword [ebp - 0x18]
cmp ecx, 8
jb 0x4048d2
inc ecx
push ecx
jmp 0x4048ca
mov eax, dword [ebp - 0x60]
test eax, eax
je 0x4048b5
lea ecx, [ebp - 0x64]
mov dword [ebp - 0x14], 0
push ecx
push 0
lea ecx, [ebp - 0x14]
mov dword [ebp - 0x64], 0
push ecx
push 0
push ebx
push eax
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x4048ac
mov eax, dword [ebp - 0x14]
sub eax, 1
je 0x404838
sub eax, 1
jne 0x4048ac
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405125
mov ecx, dword [ebp - 0x64]
mov edi, eax
add ecx, ecx
push ecx
push 0
push edi
call fcn.004072f0
add esp, 0x10
lea eax, [ebp - 0x64]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0
push ebx
push dword [ebp - 0x60]
call eax
test eax, eax
jne 0x4048a3
push edi
lea ecx, [ebp - 0x44]
call fcn.004012a0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x44]
mov byte [ebp - 4], 2
push eax
lea ecx, [ebp - 0x2c]
call fcn.004019f0
lea ecx, [ebp - 0x44]
jmp 0x40489e
mov eax, dword [ebp - 0x64]
xor ecx, ecx
mov edx, 2
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00405125
mov ecx, dword [ebp - 0x64]
mov edi, eax
add ecx, ecx
push ecx
push 0
push edi
call fcn.004072f0
add esp, 0x10
lea eax, [ebp - 0x64]
push eax
push edi
lea eax, [ebp - 0x14]
push eax
mov eax, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push 0
push ebx
push dword [ebp - 0x60]
call eax
test eax, eax
jne 0x4048a3
push edi
lea ecx, [ebp - 0x5c]
call fcn.004012a0
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x5c]
mov byte [ebp - 4], 1
push eax
lea ecx, [ebp - 0x2c]
call fcn.004019f0
lea ecx, [ebp - 0x5c]
call fcn.004011e0
push edi
call fcn.004050da
add esp, 4
push dword [ebp - 0x60]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x2c]
mov ecx, esi
push eax
call fcn.00401220
mov eax, dword [ebp - 0x18]
cmp eax, 8
jb 0x4048d2
inc eax
push eax
push dword [ebp - 0x2c]
call fcn.004018d0
mov eax, esi
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.004050c9
mov esp, ebp
pop ebp
ret