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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45feb0
mov eax, dword fs:[0]
push eax
sub esp, 0x58
mov eax, dword [0x4786a0]
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 0x40e26b
cmp eax, ebx
je 0x40e26b
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 0x46cea0
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 0x40e296
sub eax, edx
sar eax, 1
push eax
mov eax, edi
lea ecx, [ebp - 0x30]
call fcn.00429690
test ebx, ebx
jne 0x40e4bb
mov edx, dword [0x478034]
mov eax, dword [edx + 0xc]
mov ecx, 0x478034
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 0x40e2e8
push str.ctdownloader__d
jmp 0x40e2ed
push str.ctbootstrapper__d
call fcn.00422e30
add esp, 8
lea ecx, [ebp - 0x40]
push ecx
mov ecx, 0x4695fc
call fcn.00401110
mov byte [ebp - 4], 3
mov eax, dword [esi + 0xac]
mov ecx, dword [eax - 0xc]
push ecx
push eax
lea ebx, [ebp - 0x40]
call fcn.00420540
cmp dword [0x47b5bc], 0
je 0x40e32c
push 0x14
push str.___silentmode_true_
jmp 0x40e333
push 1
push 0x4695fc
call fcn.00420540
push 0xf
push str.__afterreboot_
lea ebx, [ebp - 0x40]
call fcn.00420540
mov eax, dword [esi + 0x90]
mov ecx, dword [eax - 0xc]
push ecx
push eax
call fcn.00420540
push 1
push 0x4695fc
call fcn.00420540
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 0x40e372
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.004250d0
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 0x40e46b
mov ecx, dword [ebp - 0x4c]
mov byte [ecx + 0x10e], 1
cmp edi, ebx
je 0x40e3da
push edi
call fcn.0044543c
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 0x40e3fd
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 0x40e41d
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 0x40e43f
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 0x40e452
cmp dword [ebp - 0x3c], eax
je 0x40e452
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 8
jb 0x40e464
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0044543c
add esp, 4
mov al, 1
jmp 0x40e505
cmp edi, ebx
je 0x40e478
push edi
call fcn.0044543c
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 0x40e49b
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 0x40e4bb
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 0x40e4de
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 0x40e4f1
cmp dword [ebp - 0x3c], eax
je 0x40e4f1
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [ebp - 0x1c], 8
jb 0x40e503
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0044543c
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.00445447
mov esp, ebp
pop ebp
ret 4