Function at 0x40f840
Capabilities:
Persist via run registry key
Set registry value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x469f00
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4846a0]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, SysReAllocStringLen
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x38], eax
xor ebx, ebx
mov esi, ecx
xor eax, eax
mov dword [ebp - 0x4c], esi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x1c], 7
mov dword [ebp - 0x20], ebx
mov word [ebp - 0x30], ax
lea ecx, [ebp - 0x44]
push ecx
mov ecx, str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
mov dword [ebp - 4], ebx
call fcn.00401110
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x38]
mov edi, dword [ebp - 0x44]
cmp dword [ebp - 0x3c], eax
je 0x40f8bb
cmp eax, ebx
je 0x40f8bb
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov eax, dword [ebp - 0x3c]
push ebx
lea edx, [ebp - 0x38]
push edx
push ebx
push 0xf003f
push ebx
push 0x4776ac
push ebx
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, eax
mov eax, edi
mov dword [ebp - 0x34], 0xf003f
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f8e6
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x30]
call fcn.00430450
test ebx, ebx
jne 0x40fb0b
mov edx, dword [0x484034]
mov eax, dword [edx + 0xc]
mov ecx, 0x484034
call eax
add eax, 0x10
mov dword [ebp - 0x48], eax
mov byte [ebp - 4], 2
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea edi, [ebp - 0x48]
cmp byte [ebp + 8], bl
je 0x40f938
push str.ctdownloader__d
jmp 0x40f93d
push str.ctbootstrapper__d
call fcn.00428bb0
add esp, 8
lea ecx, [ebp - 0x40]
push ecx
mov ecx, 0x4721b4
call fcn.00401110
mov byte [ebp - 4], 3
mov eax, dword [esi + 0xc4]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x40]
call fcn.00424980
cmp dword [0x4876f0], 0
je 0x40f97c
push 0x14
push str.___silentmode_true_
jmp 0x40f983
push 1
push 0x4721b4
call fcn.00424980
push 0xf
push str.__afterreboot_
lea ebx, [ebp - 0x40]
call fcn.00424980
mov eax, dword [esi + 0x90]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call fcn.00424980
push 1
push 0x4721b4
call fcn.00424980
mov edx, dword [ebp - 0x40]
mov eax, edx
mov dword [ebp - 0x60], 1
lea edi, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40f9c2
mov ecx, dword [ebp - 0x4c]
sub eax, edi
sar eax, 1
push ecx
lea eax, [edx + eax*2 + 2]
xor ebx, ebx
push eax
lea ecx, [ebp - 0x5c]
push ecx
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x58], ebx
mov dword [ebp - 0x54], ebx
call fcn.0042b6b0
mov edi, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x58]
mov edx, dword [ebp - 0x60]
mov esi, dword [ebp - 0x48]
sub eax, edi
push eax
mov eax, dword [ebp - 0x38]
push edi
push edx
push ebx
push esi
push eax
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
test eax, eax
jne 0x40fabb
mov ecx, dword [ebp - 0x4c]
mov byte [ecx + 0x12a], 1
cmp edi, ebx
je 0x40fa2a
push edi
call fcn.0044ee8c
add esp, 4
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40fa4d
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa6d
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 - 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fa8f
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x38]
cmp eax, ebx
je 0x40faa2
cmp dword [ebp - 0x3c], eax
je 0x40faa2
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 8
jb 0x40fab4
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0044ee8c
add esp, 4
mov al, 1
jmp 0x40fb55
cmp edi, ebx
je 0x40fac8
push edi
call fcn.0044ee8c
add esp, 4
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x40]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40faeb
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
lea eax, [esi - 0x10]
mov byte [ebp - 4], 1
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb0b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [ebp - 4], 0
mov eax, dword [ebp - 0x44]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40fb2e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40fb41
cmp dword [ebp - 0x3c], eax
je 0x40fb41
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 8
jb 0x40fb53
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0044ee8c
add esp, 4
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.0044ee97
mov esp, ebp
pop ebp
ret 4