Function at 0x40e530
Capabilities:
Delete registry value
Persist via run registry key
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x45fe5b
mov eax, dword fs:[0]
push eax
sub esp, 0x158
mov eax, dword [0x4786a0]
xor eax, esp
mov dword [esp + 0x150], eax
push ebx
push esi
push edi
mov eax, dword [0x4786a0]
xor eax, esp
push eax
lea eax, [esp + 0x168]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
xor ebx, ebx
mov dword [esp + 0x34], eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x58], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x170], ebx
mov ecx, SysReAllocStringLen
mov dword [esp + 0x9c], ecx
mov dword [esp + 0xa0], ecx
xor ecx, ecx
mov dword [esp + 0xa4], ebx
mov dword [esp + 0xbc], 7
mov dword [esp + 0xb8], ebx
mov word [esp + 0xa8], cx
lea edx, [esp + 0x1c]
mov byte [esp + 0x170], 1
push edx
mov ecx, str.SoftwareMicrosoftWindowsCurrentVersionRunOnce
mov byte [eax + 0x10e], bl
call fcn.00401110
mov byte [esp + 0x170], 2
mov eax, dword [esp + 0xa0]
mov esi, dword [esp + 0x1c]
cmp dword [esp + 0x9c], eax
je 0x40e60a
cmp eax, ebx
je 0x40e60a
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [esp + 0x9c]
lea eax, [esp + 0xa0]
push eax
push 0xf003f
push ebx
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
mov eax, esi
mov dword [esp + 0xa4], 0xf003f
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e640
sub eax, edx
sar eax, 1
push eax
mov eax, esi
lea ecx, [esp + 0xac]
call fcn.00429690
cmp edi, ebx
jne 0x40ed86
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
mov dword [esp + 0x28], ebx
mov byte [esp + 0x170], 3
mov eax, dword [esp + 0xa0]
mov edx, dword [esp + 0x9c]
sub edx, eax
neg edx
sbb edx, edx
and edx, eax
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x108]
push ecx
mov dword [esp + 0x1c], edx
call fcn.00404700
xor esi, esi
xor edx, edx
mov dword [esp + 0xc4], esi
mov dword [esp + 0xc8], ebx
mov dword [esp + 0xcc], ebx
mov dword [esp + 0xd0], ebx
mov dword [esp + 0xe8], 7
mov dword [esp + 0xe4], ebx
mov word [esp + 0xd4], dx
mov dword [esp + 0xf0], ebx
mov dword [esp + 0xf4], ebx
mov dword [esp + 0xf8], ebx
mov dword [esp + 0xfc], ebx
mov byte [esp + 0x170], 6
mov eax, dword [0x478034]
mov edx, dword [eax + 0xc]
mov ecx, 0x478034
call edx
add eax, 0x10
mov dword [esp + 0x18], eax
push str.ctdownloader
lea eax, [esp + 0x1c]
push eax
lea ebx, [esi + 0xc]
mov byte [esp + 0x178], 7
call fcn.00401330
mov eax, dword [esp + 0x104]
test eax, eax
jne 0x40e749
test esi, esi
sete al
jmp 0x40e7d3
cmp eax, esi
jne 0x40e7db
mov ecx, dword [esp + 0xc8]
cmp dword [esp + 0x108], ecx
jne 0x40e7db
cmp dword [esp + 0xe8], 8
mov eax, dword [esp + 0xd4]
jae 0x40e779
lea eax, [esp + 0xd4]
mov edi, dword [esp + 0xe4]
push eax
mov eax, dword [esp + 0x128]
lea ecx, [esp + 0x118]
call fcn.00424a40
test eax, eax
jne 0x40e7db
mov edx, dword [esp + 0x130]
cmp edx, dword [esp + 0xf0]
jne 0x40e7db
mov ecx, dword [esp + 0x138]
mov eax, dword [esp + 0x134]
mov edi, dword [esp + 0xf8]
mov edx, dword [esp + 0xf4]
mov esi, ecx
sub esi, eax
sub edi, edx
cmp esi, edi
jne 0x40e7db
call fcn.00427270
test al, al
jne 0x40ec34
lea eax, [esp + 0x104]
push eax
lea edi, [esp + 0x68]
call fcn.00404850
mov byte [esp + 0x170], 8
mov eax, dword [eax]
xor ebx, ebx
xor ecx, ecx
mov word [esp + 0x144], cx
mov ecx, eax
mov dword [esp + 0x158], 7
mov dword [esp + 0x154], ebx
lea esi, [ecx + 2]
lea esp, [esp]
mov dx, word [ecx]
add ecx, 2
cmp dx, bx
jne 0x40e820
sub ecx, esi
sar ecx, 1
push ecx
lea ecx, [esp + 0x148]
call fcn.00429690
mov byte [esp + 0x170], 0xa
mov eax, dword [esp + 0x6c]
cmp eax, ebx
je 0x40e855
push eax
call fcn.0044543c
add esp, 4
lea edx, [esp + 0x104]
push edx
lea edi, [esp + 0x84]
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x78], ebx
call fcn.00404850
mov byte [esp + 0x170], 0xb
mov ecx, dword [eax + 4]
lea edx, [esp + 0x3c]
mov dword [esp + 0x38], ecx
lea ecx, [eax + 8]
push edx
call fcn.0041ec90
mov byte [esp + 0x170], 0xd
mov eax, dword [esp + 0x88]
cmp eax, ebx
je 0x40e8ad
push eax
call fcn.0044543c
add esp, 4
cmp dword [esp + 0x38], 1
mov dword [esp + 0x88], ebx
mov dword [esp + 0x8c], ebx
mov dword [esp + 0x90], ebx
jne 0x40ebde
mov edx, dword [esp + 0x18]
mov eax, edx
lea esi, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e8d6
sub eax, esi
sar eax, 1
push eax
push edx
lea eax, [esp + 0x14c]
push eax
xor eax, eax
call fcn.00420990
test eax, eax
jne 0x40ebde
mov eax, dword [esp + 0x3c]
xor ecx, ecx
mov dword [esp + 0x78], 7
mov dword [esp + 0x74], ebx
mov word [esp + 0x64], cx
lea edx, [eax + 2]
jmp 0x40e920
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x40e920
sub eax, edx
sar eax, 1
push eax
mov eax, dword [esp + 0x40]
lea ecx, [esp + 0x68]
call fcn.00429690
push 0xc
push str.afterreboot
lea edx, [esp + 0x6c]
mov bl, 0xe
push edx
xor eax, eax
mov byte [esp + 0x17c], bl
call fcn.00420990
cmp eax, 0xffffffff
je 0x40ebca
lea ecx, [eax + 0xd]
push 0xffffffffffffffff
lea eax, [esp + 0x84]
lea edx, [esp + 0x68]
call fcn.0041eae0
mov edi, eax
lea esi, [esp + 0x64]
mov byte [esp + 0x170], 0xf
call fcn.00420860
mov byte [esp + 0x170], bl
cmp dword [esp + 0x94], 8
jb 0x40e9ab
mov eax, dword [esp + 0x80]
push eax
call fcn.0044543c
add esp, 4
cmp dword [esp + 0x74], 0
jbe 0x40ebca
push 2
push 0x4695f4
lea ecx, [esp + 0x6c]
push ecx
xor eax, eax
call fcn.00420990
cmp eax, 0xffffffff
je 0x40ea15
push eax
xor ecx, ecx
lea eax, [esp + 0x84]
lea edx, [esp + 0x68]
call fcn.0041eae0
mov edi, eax
lea esi, [esp + 0x64]
mov byte [esp + 0x170], 0x10
call fcn.00420860
mov byte [esp + 0x170], bl
cmp dword [esp + 0x94], 8
jb 0x40ea15
mov edx, dword [esp + 0x80]
push edx
call fcn.0044543c
add esp, 4
sub esp, 0x1c
mov ecx, esp
xor edi, edi
xor eax, eax
mov esi, 7
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
mov dword [esp + 0x68], esp
mov word [ecx], ax
push edi
mov eax, 0x46cea0
call fcn.00429690
sub esp, 0x1c
mov ecx, esp
mov byte [esp + 0x1a8], 0x11
mov dword [esp + 0x68], esp
xor edx, edx
mov dword [ecx + 0x14], esi
mov dword [ecx + 0x10], edi
push 1
mov eax, 0x4695fc
mov word [ecx], dx
call fcn.00429690
lea ecx, [esp + 0x9c]
mov byte [esp + 0x1a8], bl
call fcn.004235e0
add esp, 0x1c
mov edi, esp
xor eax, eax
mov dword [esp + 0x4c], esp
push eax
mov dword [edi + 0x14], esi
mov dword [edi + 0x10], 0
lea ecx, [esp + 0x84]
mov word [edi], ax
push ecx
or eax, 0xffffffff
call fcn.00429370
lea ecx, [esp + 0x9c]
call fcn.00423690
add esp, 0x1c
mov edi, eax
lea esi, [esp + 0x64]
mov byte [esp + 0x170], 0x12
call fcn.00420860
mov byte [esp + 0x170], bl
cmp dword [esp + 0x94], 8
jb 0x40eae2
mov edx, dword [esp + 0x80]
push edx
call fcn.0044543c
add esp, 4
cmp dword [esp + 0x78], 8
mov ecx, dword [esp + 0x64]
jae 0x40eaf1
lea ecx, [esp + 0x64]
mov eax, dword [esp + 0x74]
cmp word [ecx + eax*2 - 2], 0x5c
jne 0x40eb45
dec eax
push eax
xor ecx, ecx
lea eax, [esp + 0x84]
lea edx, [esp + 0x68]
call fcn.0041eae0
mov edi, eax
lea esi, [esp + 0x64]
mov byte [esp + 0x170], 0x13
call fcn.00420860
mov byte [esp + 0x170], bl
cmp dword [esp + 0x94], 8
jb 0x40eb45
mov eax, dword [esp + 0x80]
push eax
call fcn.0044543c
add esp, 4
cmp dword [esp + 0x78], 8
mov ecx, dword [esp + 0x64]
jae 0x40eb54
lea ecx, [esp + 0x64]
lea edx, [esp + 0x14]
push edx
call fcn.00401110
mov eax, dword [esp + 0x34]
mov byte [esp + 0x170], 0x14
mov eax, dword [eax + 0x90]
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
je 0x40ec2a
mov ecx, dword [esp + 0x14]
push eax
push ecx
call fcn.0044646f
add esp, 8
test eax, eax
jne 0x40eba3
lea ecx, [esp + 0x144]
lea ebx, [esp + 0x20]
call fcn.0041fe70
mov bl, 0xe
mov byte [esp + 0x170], bl
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40ebca
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
cmp dword [esp + 0x78], 8
jb 0x40ebde
mov ecx, dword [esp + 0x64]
push ecx
call fcn.0044543c
add esp, 4
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x40ebef
push eax
call fcn.0044543c
add esp, 4
mov byte [esp + 0x170], 7
cmp dword [esp + 0x158], 8
jb 0x40ec11
mov edx, dword [esp + 0x144]
push edx
call fcn.0044543c
add esp, 4
lea eax, [esp + 0x104]
push eax
call fcn.00404930
mov esi, dword [esp + 0xc4]
jmp 0x40e734
push 0x80004005
call fcn.00401680
mov ecx, dword [esp + 0x24]
sub ecx, dword [esp + 0x20]
mov eax, 0x92492493
imul ecx
add edx, ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
add eax, edx
je 0x40ec7d
mov esi, dword [esp + 0x20]
mov ebx, dword [sym.imp.ADVAPI32.dll_RegDeleteValueW]
mov edi, eax
lea ecx, [ecx]
cmp dword [esi + 0x14], 8
jb 0x40ec6a
mov eax, dword [esi]
jmp 0x40ec6c
mov eax, esi
mov ecx, dword [esp + 0xa0]
push eax
push ecx
call ebx
add esi, 0x1c
dec edi
jne 0x40ec60
mov byte [esp + 0x170], 6
mov eax, dword [esp + 0x18]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40eca5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xf4]
xor esi, esi
cmp eax, esi
je 0x40ecbb
push eax
call fcn.0044543c
add esp, 4
mov edi, 8
cmp dword [esp + 0xe8], edi
jb 0x40ecd9
mov ecx, dword [esp + 0xd4]
push ecx
call fcn.0044543c
add esp, 4
mov eax, dword [esp + 0x134]
cmp eax, esi
je 0x40eced
push eax
call fcn.0044543c
add esp, 4
mov dword [esp + 0x134], esi
mov dword [esp + 0x138], esi
mov dword [esp + 0x13c], esi
cmp dword [esp + 0x128], edi
jb 0x40ed1b
mov edx, dword [esp + 0x114]
push edx
call fcn.0044543c
add esp, 4
mov ebx, dword [esp + 0x20]
xor eax, eax
mov dword [esp + 0x128], 7
mov dword [esp + 0x124], esi
mov word [esp + 0x114], ax
cmp ebx, esi
je 0x40ed84
mov edi, dword [esp + 0x24]
mov esi, ebx
cmp ebx, edi
je 0x40ed7b
lea esp, [esp]
cmp dword [esi + 0x14], 8
jb 0x40ed61
mov eax, dword [esi]
push eax
call fcn.0044543c
add esp, 4
xor ecx, ecx
mov dword [esi + 0x14], 7
mov dword [esi + 0x10], 0
mov word [esi], cx
add esi, 0x1c
cmp esi, edi
jne 0x40ed50
push ebx
call fcn.0044543c
add esp, 4
xor ebx, ebx
mov byte [esp + 0x170], 1
mov eax, dword [esp + 0x1c]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40edae
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, dword [esp + 0xa0]
cmp eax, ebx
je 0x40edc9
cmp dword [esp + 0x9c], eax
je 0x40edc9
push eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esp + 0xbc], 8
jb 0x40ede3
mov ecx, dword [esp + 0xa8]
push ecx
call fcn.0044543c
add esp, 4
mov ecx, dword [esp + 0x168]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x150]
xor ecx, esp
call fcn.00445447
mov esp, ebp
pop ebp
ret 4