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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x54eb80
mov eax, dword fs:[0]
push eax
sub esp, 0x220
mov eax, dword [0x5ba6c4]
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 ecx, dword [ebp + 0xc]
mov dword [ebp - 0x228], ecx
xor ebx, ebx
mov dword [ebp - 4], ebx
call fcn.00401450
push 0xff
lea eax, [ebp - 0x20f]
push ebx
push eax
mov byte [ebp - 0x210], bl
call fcn.0052f600
push 0xff
lea ecx, [ebp - 0x10f]
push ebx
push ecx
mov byte [ebp - 0x110], bl
call fcn.0052f600
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
push eax
call fcn.00401350
lea esi, [eax + 0x10]
add esp, 0x1c
mov dword [ebp - 0x218], esi
mov byte [ebp - 4], 2
call fcn.0042e490
xor ecx, ecx
cmp eax, ebx
setne cl
cmp ecx, ebx
jne 0x4052e7
push 0x80004005
call fcn.00401000
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
lea edi, [eax + 0x10]
mov dword [ebp - 0x214], edi
mov byte [ebp - 4], 4
lea ecx, [ebp - 0x22c]
push ecx
lea edx, [ebp - 0x21c]
push edx
push ebx
push 0xf003f
push ebx
push ebx
push ebx
push str.SoftwareMicrosoftWindowsCurrentVersionRun
push SysReAllocStringLen
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
cmp eax, ebx
je 0x40536c
mov byte [ebp - 4], 2
lea eax, [edi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405348
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405367
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
jmp 0x4054ee
lea ecx, [ebp - 0x218]
call fcn.004040a0
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x110]
push edx
mov edx, dword [ebp - 0x21c]
push ebx
mov eax, 0x100
push ebx
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x210]
push ecx
push ebx
push edx
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
mov esi, 1
cmp eax, ebx
jne 0x40549c
lea eax, [ebp - 0x110]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x4053d0
sub eax, edx
je 0x405423
push eax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x214]
call fcn.004017f0
lea ecx, [ebp - 0x214]
call fcn.004040a0
mov eax, dword [ebp - 0x218]
mov edi, dword [ebp - 0x214]
cmp eax, ebx
je 0x405423
cmp dword [edi - 0xc], ebx
jl 0x405423
push eax
push edi
call fcn.00530b86
add esp, 8
cmp eax, ebx
je 0x405423
sub eax, edi
cmp eax, 0xffffffff
jne 0x405471
lea ecx, [ebp - 0x224]
push ecx
lea edx, [ebp - 0x110]
push edx
mov edx, dword [ebp - 0x21c]
push ebx
mov eax, 0x100
push ebx
mov dword [ebp - 0x220], eax
mov dword [ebp - 0x224], eax
lea eax, [ebp - 0x220]
push eax
lea ecx, [ebp - 0x210]
push ecx
push esi
push edx
mov byte [ebp - 0x110], bl
call dword [sym.imp.ADVAPI32.dll_RegEnumValueA]
inc esi
cmp eax, ebx
je 0x4053c1
jmp 0x40549c
lea eax, [ebp - 0x210]
lea edx, [eax + 1]
lea ebx, [ebx]
mov cl, byte [eax]
inc eax
cmp cl, bl
jne 0x405480
mov ecx, dword [ebp - 0x228]
sub eax, edx
push eax
lea eax, [ebp - 0x210]
push eax
call fcn.004017f0
mov ecx, dword [ebp - 0x21c]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov byte [ebp - 4], 2
lea eax, [edi - 0x10]
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x4054c9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], bl
mov eax, dword [ebp - 0x218]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x4054ee
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x405514
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
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.0052f5f0
mov esp, ebp
pop ebp
ret