Function at 0x40ce10
Capabilities:
Persist via windows service
Set registry value

Disassembly:
sub esp, 0x228
mov eax, dword [0x5b0c20]
xor eax, esp
mov dword [esp + 0x224], eax
mov eax, dword [esp + 0x230]
mov ecx, dword [esp + 0x238]
push esi
mov esi, dword [esp + 0x230]
push 0x1a8
lea edx, [esp + 0x34]
push 0
push edx
mov dword [esp + 0x24], esi
mov dword [esp + 0x2c], eax
mov dword [esp + 0x14], ecx
call fcn.00526520
add esp, 0xc
cmp dword [0x5b2904], 0
jne 0x40ce74
cmp dword [0x5b2908], 0
mov dword [esp + 0xc], 0xf003f
je 0x40ce7c
mov dword [esp + 0xc], 0xf013f
cmp dword [esi + 0x3b24], 0
jne 0x40d1d3
cmp dword [esi + 0x37c], 0
je 0x40d1d3
push ebx
push ebp
push edi
call fcn.0044b8f0
mov edi, eax
call fcn.0044b920
test edi, edi
je 0x40cec3
cmp dword [edi + 0x37c], 0
je 0x40cec3
mov cl, byte [edi + 0x2af1]
lea eax, [edi + 2]
mov dword [esp + 0x1c], eax
mov ebx, edi
jmp 0x40cee7
test eax, eax
je 0x40d161
cmp dword [eax + 0x37c], 0
je 0x40d161
mov cl, byte [eax + 0x2af1]
lea edx, [eax + 2]
mov dword [esp + 0x1c], edx
mov ebx, eax
lea edx, [esp + 0x30]
push edx
mov edx, dword [esi + 0x35c]
lea eax, [esp + 0x2c]
push eax
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x40]
push ecx
push edx
push 0
lea ebp, [esi + 2]
push 0
push ebp
call fcn.0044c9e0
add esp, 0x1c
test eax, eax
je 0x40d179
mov ecx, dword [esp + 0x28]
push 0
push 0x10
lea eax, [esp + 0x1ac]
push eax
push ecx
call fcn.0044b6b0
add esp, 0x10
test eax, eax
je 0x40d161
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
mov dword [esp + 0x19c], edx
lea edx, [esp + 0x3c]
mov dword [esp + 0x1a0], eax
mov eax, ebp
sub edx, ebp
jmp 0x40cf60
movzx ecx, word [eax]
mov word [edx + eax], cx
add eax, 2
test cx, cx
jne 0x40cf60
cmp dword [esp + 0x244], 0
mov esi, dword [esp + 0x2c]
mov ecx, 0x18
lea edi, [esp + 0x13c]
rep movsd dword es:[edi], dword [esi]
je 0x40d09c
push 0x2400
mov byte [esp + 0x1e8], 0
mov byte [esp + 0x1e9], 0
mov byte [esp + 0x1ea], 0
mov byte [esp + 0x1eb], 0
mov byte [esp + 0x1ec], 0
mov byte [esp + 0x1ed], 0
mov byte [esp + 0x1ee], 0
mov byte [esp + 0x1ef], 0
mov byte [esp + 0x1f0], 0
mov byte [esp + 0x1f1], 0
mov byte [esp + 0x1f2], 0
mov byte [esp + 0x1f3], 0
mov byte [esp + 0x1f4], 0
mov byte [esp + 0x1f5], 0
mov byte [esp + 0x1f6], 0
mov byte [esp + 0x1f7], 0
call fcn.00401bb0
mov esi, eax
add esp, 4
test esi, esi
je 0x40d161
mov ecx, dword [esp + 0x14]
movzx edx, byte [ebx + 0x2af0]
push esi
push ecx
push edx
call fcn.00452280
push 0
push esi
push 0
lea eax, [esp + 0x1fc]
push eax
movzx eax, byte [ebx + 0x2af0]
push 0x1a0
lea ecx, [esp + 0x5c]
push ecx
mov edx, ecx
push edx
push eax
call fcn.00452740
mov eax, ebp
add esp, 0x2c
lea edx, [eax + 2]
jmp 0x40d070
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x40d070
sub eax, edx
sar eax, 1
lea ecx, [esp + 0x1c4]
push ecx
lea edx, [eax + eax]
push edx
push ebp
call fcn.004535b0
push esi
call fcn.00401bc0
add esp, 0x10
jmp 0x40d0c5
mov eax, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x20]
push 0x1a8
lea ecx, [esp + 0x44]
push ecx
mov edx, ecx
push edx
push 1
push eax
call fcn.004143e0
add esp, 0x18
test eax, eax
je 0x40d161
mov esi, dword [esp + 0x18]
lea ecx, [esp + 0x10]
push ecx
push esi
push 0
push str.SYSTEMCurrentControlSetServices_bcfntBootEnum
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
je 0x40d10f
lea edx, [esp + 0x14]
push edx
lea eax, [esp + 0x14]
push eax
push 0
push esi
push 0
push 0x58cf10
push 0
push str.SYSTEMCurrentControlSetServices_bcfntBootEnum
push closesocket
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
test eax, eax
jne 0x40d161
mov eax, dword [0x5c24e0]
inc eax
push eax
lea ecx, [esp + 0x1f8]
push 0x550694
push ecx
mov dword [0x5c24e0], eax
call dword [sym.imp.USER32.dll_wsprintfW]
mov ecx, dword [esp + 0x1c]
add esp, 0xc
push 0x1a8
lea edx, [esp + 0x40]
push edx
push 3
push 0
lea eax, [esp + 0x204]
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov edx, dword [esp + 0x10]
push edx
test eax, eax
je 0x40d194
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40
push 0
push 0xef1c
push 0xefd6
mov ecx, 0x5b2810
call fcn.00405df0
xor eax, eax
pop edi
pop ebp
pop ebx
pop esi
mov ecx, dword [esp + 0x224]
xor ecx, esp
call fcn.00524d83
add esp, 0x228
ret
mov eax, dword [esp + 0x28]
mov dword [eax + 0x3b24], 1
mov ecx, dword [0x5c24e0]
mov dword [eax + 0x3b30], ecx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
push 0x40
push 0
push 0xef1c
push 0xefd4
mov ecx, 0x5b2810
call fcn.00405df0
mov eax, 1
jmp 0x40d17b
mov ecx, dword [esp + 0x228]
pop esi
xor ecx, esp
mov eax, 1
call fcn.00524d83
add esp, 0x228
ret