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

Disassembly:
sub esp, 0x400
mov eax, dword [0x42a718]
xor eax, esp
mov dword [esp + 0x3fc], eax
mov eax, dword [esp + 0x404]
mov edx, dword [0x42bbe0]
mov dword [esp + 0xc], eax
mov eax, dword [edx + 0xc]
push esi
mov ecx, 0x42bbe0
mov dword [esp + 4], 0
mov dword [esp + 0xc], 0
call eax
mov esi, eax
mov edx, dword [esi + 8]
add esi, 0x10
mov ecx, 1
sub ecx, dword [esi - 4]
sub edx, 0x3e8
or ecx, edx
mov dword [esp + 8], esi
jge 0x40c390
push 0x3e8
lea ecx, [esp + 0xc]
call fcn.004021b0
mov esi, dword [esp + 8]
push 0x3e8
push esi
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test esi, esi
jne 0x40c3a6
xor eax, eax
jmp 0x40c3c5
mov eax, esi
lea edx, [eax + 2]
jmp 0x40c3b0
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40c3b0
sub eax, edx
sar eax, 1
js 0x40c576
cmp eax, dword [esi - 8]
jg 0x40c576
push ebx
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyW]
mov dword [esi - 0xc], eax
mov word [esi + eax*2], 0
lea eax, [esp + 0xc]
push eax
push 0x423418
push SysReAllocStringLen
call edi
mov eax, dword [esp + 0xc]
test eax, eax
mov ebx, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
je 0x40c424
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push 0
push 0x4233f8
push eax
call ebx
test eax, eax
je 0x40c4a7
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [esp + 0xc]
push eax
push 0x423418
push reloc.OLEAUT32.dll_SysReAllocString
call edi
mov eax, dword [esp + 0xc]
test eax, eax
je 0x40c45f
lea ecx, [esp + 0x14]
push ecx
push 0
push 0
push 0
push 0x4233f8
push eax
call ebx
test eax, eax
je 0x40c4a7
mov edx, dword [esp + 0xc]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [esp + 0x18]
push 0x423f38
mov ecx, edi
call fcn.004052c0
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c48b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, edi
mov ecx, dword [esp + 0x408]
pop edi
pop ebx
pop esi
xor ecx, esp
call fcn.00412b82
add esp, 0x400
ret 4
mov edx, dword [0x42bbe0]
mov eax, dword [edx + 0xc]
mov ecx, 0x42bbe0
call eax
push 0x3e8
mov edi, eax
lea ecx, [esp + 0x24]
push 0
add edi, 0x10
push ecx
mov dword [esp + 0x1c], edi
call fcn.00412ba0
add esp, 0xc
lea edx, [esp + 0x14]
push edx
mov edx, dword [esp + 0x10]
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x24]
push ecx
push 0
push 0x4233f8
push edx
call ebx
test eax, eax
jne 0x40c51a
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x14]
call fcn.00403db0
push 0x423f38
push 0x424460
lea ecx, [esp + 0x18]
call fcn.0040bec0
mov edi, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
add edi, 0xfffffff0
push edi
call fcn.00401950
mov ebx, dword [esp + 0x1c]
add eax, 0x10
mov dword [ebx], eax
add esp, 4
lea edx, [edi + 0xc]
or eax, 0xffffffff
lock xadd dword [edx], eax
dec eax
test eax, eax
jg 0x40c553
mov ecx, dword [edi]
mov edx, dword [ecx]
mov eax, dword [edx + 4]
push edi
call eax
lea eax, [esi - 0x10]
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40c56f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, ebx
jmp 0x40c48d
push 0x80070057
call fcn.00401000
int3