Function at 0x40a310
Capabilities:
Check for time delay via gettickcount
Encode data using xor
Query or enumerate registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4bd838
mov eax, dword fs:[0]
push eax
sub esp, 0x3ac
mov eax, dword [0x515e20]
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 eax, dword [ebp + 0x10]
mov dword [ebp - 0x3b8], eax
xor eax, eax
cmp byte [0x517420], al
mov ecx, 0x5159f8
sete al
mov dword [ebp - 4], 1
add eax, 0x80000001
mov dword [ebp - 0x3a0], eax
mov eax, dword [0x5159f8]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x3a4], eax
mov byte [ebp - 4], 2
call fcn.0040ba40
mov edi, dword [sym.imp.KERNEL32.dll_GetTickCount]
test al, al
jne 0x40a399
call edi
mov esi, eax
mov dword [0x517280], esi
jmp 0x40a39f
mov esi, dword [0x517280]
or ebx, 0xffffffff
cmp byte [ebp + 0x14], 0
je 0x40a4de
imul esi, esi
mov eax, esi
cdq
mov ecx, 0x13
idiv ecx
cmp edx, 8
jne 0x40a3c5
call edi
mov dword [0x517280], eax
cmp byte [0x51102c], 0
jne 0x40a43b
mov eax, dword [0x517570]
cmp dword [eax - 0xc], 0
jne 0x40a3e5
mov dword [ebp - 0x3a0], VariantCopy
jmp 0x40a43b
push 0x4d3314
lea eax, [ebp - 0x390]
push 0x517570
push eax
mov dword [ebp - 0x3a0], VariantCopy
call fcn.00402ae0
add esp, 0xc
push eax
lea ecx, [ebp - 0x3a4]
mov byte [ebp - 4], 3
call fcn.00402610
mov edx, dword [ebp - 0x390]
add edx, 0xfffffff0
mov byte [ebp - 4], 2
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a43b
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
call fcn.0040b900
test al, al
jne 0x40a4d8
xor ecx, ecx
mov dword [ebp - 0x38c], ecx
lea esi, [ebp - 0x384]
jmp 0x40a460
xor eax, eax
mov dword [ebp - 0x394], eax
mov dword [ebp - 0x390], esi
mov edi, edi
mov esi, dword [0x517280]
lea ebx, [eax + 1]
mov eax, esi
cdq
inc ecx
idiv ecx
mov eax, esi
mov ecx, esi
sub ecx, dword [ebp - 0x38c]
mov esi, dword [ebp - 0x390]
mov edi, edx
cdq
imul edi, ecx
idiv ebx
add edi, eax
sub edi, dword [ebp - 0x394]
push edi
push 0x4d1b10
call fcn.0049f507
mov ecx, dword [ebp - 0x38c]
mov eax, ebx
add esi, 4
add esp, 8
mov dword [ebp - 0x394], eax
mov dword [ebp - 0x390], esi
cmp eax, 0xd
jl 0x40a470
inc ecx
mov dword [ebp - 0x38c], ecx
cmp ecx, 0x11
jl 0x40a460
or ebx, 0xffffffff
mov esi, dword [0x517280]
mov dword [ebp - 0x3b4], 0
mov dword [ebp - 0x3b0], 0
mov dword [ebp - 0x3ac], 0
mov byte [ebp - 4], 4
call fcn.0040b8a0
test al, al
jne 0x40a593
xor edx, edx
nop
mov ecx, edx
and ecx, 1
dec ecx
not ecx
and ecx, esi
mov eax, edx
sar eax, 1
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, esi
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, esi
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, esi
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, esi
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, esi
sar ecx, 1
xor eax, ecx
mov ecx, eax
and ecx, 1
dec ecx
sar eax, 1
not ecx
and ecx, esi
xor ecx, eax
mov eax, ecx
and eax, 1
dec eax
not eax
and eax, esi
sar ecx, 1
xor eax, ecx
inc edx
add esi, eax
cmp edx, 0x100
jl 0x40a510
mov dword [0x517280], esi
mov eax, dword [0x5159f8]
mov ecx, 0x5159f8
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x38c], eax
mov eax, 0x4d337c
mov byte [ebp - 4], 5
test eax, 0xffff0000
jne 0x40a5da
movzx esi, ax
push 0
push esi
call fcn.00403010
add esp, 8
test eax, eax
je 0x40a5ea
push esi
push eax
lea ecx, [ebp - 0x38c]
call fcn.00406b10
jmp 0x40a5ea
push 0x4d337c
lea ecx, [ebp - 0x38c]
call fcn.00402750
lea eax, [ebp - 0x38c]
push eax
lea eax, [ebp - 0x3a4]
push eax
lea eax, [ebp - 0x39c]
push eax
mov byte [ebp - 4], 6
call fcn.00402a20
push 0x517574
push eax
lea eax, [ebp - 0x398]
push eax
mov byte [ebp - 4], 7
call fcn.00402a20
push 0x4d3314
push eax
lea eax, [ebp - 0x394]
push eax
mov byte [ebp - 4], 8
call fcn.00402ae0
lea ecx, [ebp + 8]
push ecx
push eax
lea eax, [ebp - 0x390]
push eax
mov byte [ebp - 4], 9
call fcn.00402a20
add esp, 0x30
lea ecx, [ebp - 0x3b4]
push 0x20019
push dword [eax]
push dword [ebp - 0x3a0]
call fcn.0040ab40
mov edx, dword [ebp - 0x390]
test eax, eax
setne byte [ebp - 0x385]
add edx, 0xfffffff0
mov ecx, ebx
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a68c
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x394]
add edx, 0xfffffff0
mov byte [ebp - 4], 8
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a6af
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x398]
add edx, 0xfffffff0
mov byte [ebp - 4], 7
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a6d2
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x39c]
add edx, 0xfffffff0
mov byte [ebp - 4], 6
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a6f5
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp - 0x38c]
add edx, 0xfffffff0
mov byte [ebp - 4], 4
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a718
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
cmp byte [ebp - 0x385], 0
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
je 0x40a78a
mov esi, dword [0x517280]
lea eax, [esi + 1]
imul eax, esi
and eax, 0x8000000f
jns 0x40a73f
dec eax
or eax, 0xfffffff0
inc eax
cmp eax, 0xd
jne 0x40a77f
mov eax, 0x51eb851f
imul esi
sar edx, 5
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
imul ecx, ecx, 0x64
sub esi, ecx
xor ecx, ecx
lea eax, [esi + 0x141]
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0049d210
push eax
call fcn.0049ee63
add esp, 8
mov esi, dword [ebp - 0x3b4]
jmp 0x40a82c
mov dword [ebp - 0x3a8], 0
call fcn.0040b9b0
test al, al
jne 0x40a7bf
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_OpenThread]
mov ecx, dword [0x517280]
mov edx, 7
test eax, eax
cmove ecx, edx
mov dword [0x517280], ecx
mov esi, dword [ebp - 0x3b4]
lea eax, [ebp - 0x39c]
push eax
lea eax, [ebp - 0x3a8]
push eax
lea eax, [ebp - 0x398]
push eax
push 0
push dword [ebp + 0xc]
mov dword [ebp - 0x39c], 4
push esi
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
test eax, eax
jne 0x40a823
cmp dword [ebp - 0x398], 4
jne 0x40a823
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
je 0x40a80c
push esi
call edi
xor esi, esi
mov ecx, dword [ebp - 0x3b8]
mov eax, dword [ebp - 0x3a8]
mov dword [ecx], eax
mov byte [ebp - 0x385], 1
jmp 0x40a833
test esi, esi
je 0x40a82c
push esi
call edi
xor esi, esi
mov byte [ebp - 0x385], 0
test esi, esi
je 0x40a83a
push esi
call edi
mov edx, dword [ebp - 0x3a4]
add edx, 0xfffffff0
mov byte [ebp - 4], 1
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a85d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov edx, dword [ebp + 8]
add edx, 0xfffffff0
mov byte [ebp - 4], 0
lea eax, [edx + 0xc]
mov ecx, ebx
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x40a87d
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
mov esi, dword [ebp + 0xc]
add esi, 0xfffffff0
mov dword [ebp - 4], 0xffffffff
lea eax, [esi + 0xc]
lock xadd dword [eax], ebx
dec ebx
test ebx, ebx
jg 0x40a89e
mov ecx, dword [esi]
push esi
mov edx, dword [ecx]
call dword [edx + 4]
mov al, byte [ebp - 0x385]
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.0049e294
mov esp, ebp
pop ebp
ret