Function at 0x406390
Capabilities:
Create service
Persist via windows service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x421f22
mov eax, dword fs:[0]
push eax
sub esp, 0x26c
mov eax, dword [0x434064]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0x104
lea eax, [ebp - 0x218]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jne 0x4064fa
push 0x11
push str.GetModuleFileName
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.00404110
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x230]
push 0xc
xor eax, eax
mov dword [ebp - 0x220], 0
push 0x430464
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00404110
mov byte [ebp - 4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x248]
lea ecx, [ebp - 0x230]
call fcn.004020d0
mov edx, dword [ebp - 0x21c]
add esp, 4
cmp edx, 8
jb 0x406496
mov ecx, dword [ebp - 0x230]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40648c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066e6
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edx, dword [ebp - 0x234]
xor eax, eax
mov dword [ebp - 0x220], 0
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
cmp edx, 8
jb 0x4064f3
mov ecx, dword [ebp - 0x248]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4064e9
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066eb
push edx
push ecx
call fcn.0040a239
add esp, 8
xor al, al
jmp 0x4066cc
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov esi, eax
test esi, esi
jne 0x406573
push 0xd
push str.OpenSCManager
lea ecx, [ebp - 0x248]
mov dword [ebp - 0x238], eax
mov dword [ebp - 0x234], 7
mov word [ebp - 0x248], ax
call fcn.00404110
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x230]
push 0xc
xor eax, eax
mov dword [ebp - 0x220], esi
push 0x430464
mov dword [ebp - 0x21c], 7
mov word [ebp - 0x230], ax
call fcn.00404110
mov byte [ebp - 4], 3
jmp 0x40643b
push 0
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x218]
push eax
push 1
push 2
push 0x10
push 0xf01ff
push 0x4304f4
push 0x430464
push esi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
test eax, eax
jne 0x4066ca
push 0xd
push str.CreateService
lea ecx, [ebp - 0x278]
mov dword [ebp - 0x268], eax
mov dword [ebp - 0x264], 7
mov word [ebp - 0x278], ax
call fcn.00404110
mov dword [ebp - 4], 4
lea ecx, [ebp - 0x260]
push 0xc
xor eax, eax
mov dword [ebp - 0x250], 0
push 0x430464
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
call fcn.00404110
mov byte [ebp - 4], 5
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea edx, [ebp - 0x278]
lea ecx, [ebp - 0x260]
call fcn.004020d0
mov edx, dword [ebp - 0x24c]
add esp, 4
cmp edx, 8
jb 0x406666
mov ecx, dword [ebp - 0x260]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40665c
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066e6
push edx
push ecx
call fcn.0040a239
add esp, 8
mov edx, dword [ebp - 0x264]
xor eax, eax
mov dword [ebp - 0x250], 0
mov dword [ebp - 0x24c], 7
mov word [ebp - 0x260], ax
cmp edx, 8
jb 0x4066bf
mov ecx, dword [ebp - 0x278]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4066b5
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4066e6
push edx
push ecx
call fcn.0040a239
add esp, 8
push esi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor al, al
jmp 0x4066cc
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040a1f8
mov esp, ebp
pop ebp
ret
call fcn.004101f6
call fcn.004101f6
int3