Function at 0x4391c0
Capabilities:
Check if file exists
Create service
Modify service
Persist via windows service
Query or enumerate registry value
Set registry value
Start service

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59c7e6
mov eax, dword fs:[0]
push eax
sub esp, 0xcb0
mov eax, dword [0x6102d4]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov eax, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
push eax
mov dword [ebp - 0xcb0], eax
mov dword [ebp - 0xcb8], ebx
mov dword [ebp - 0xcb4], edi
call fcn.0041e7b0
lea ecx, [esi + 0x18]
push ebx
call fcn.0041e7b0
lea ecx, [esi + 0x30]
push edi
call fcn.0041e7b0
push 0x208
lea eax, [ebp - 0x218]
push 0
push eax
call fcn.0056f980
mov eax, dword [0x61b9b8]
add esp, 0xc
test eax, eax
jne 0x439277
push 0x11c
call fcn.0045ec32
add esp, 4
mov dword [ebp - 0xca8], eax
mov dword [ebp - 4], 0
test eax, eax
je 0x439269
mov ecx, eax
call fcn.00442a30
jmp 0x43926b
xor eax, eax
mov dword [ebp - 4], 0xffffffff
mov dword [0x61b9b8], eax
mov ecx, eax
call fcn.004132f0
xor ecx, ecx
mov dword [ebp - 0xc60], 0
mov word [ebp - 0xc70], cx
lea ecx, [ebp - 0xc70]
push eax
mov dword [ebp - 0xc5c], 7
call fcn.0041e7b0
mov eax, dword [0x61b9b8]
mov dword [ebp - 4], 1
test eax, eax
jne 0x4392e6
push 0x11c
call fcn.0045ec32
add esp, 4
mov dword [ebp - 0xca8], eax
mov byte [ebp - 4], 2
test eax, eax
je 0x4392db
mov ecx, eax
call fcn.00442a30
jmp 0x4392dd
xor eax, eax
mov byte [ebp - 4], 1
mov dword [0x61b9b8], eax
mov ecx, eax
call fcn.004132f0
xor ecx, ecx
mov dword [ebp - 0xc48], 0
mov word [ebp - 0xc58], cx
lea ecx, [ebp - 0xc58]
push eax
mov dword [ebp - 0xc44], 7
call fcn.0041e7b0
push 0xf
push 0x5a51fc
lea ecx, [ebp - 0xc58]
mov byte [ebp - 4], 3
call fcn.004114b0
cmp dword [esi + 0x58], 0
lea edx, [esi + 0x48]
jne 0x43933e
push 0xf
push 0x5a51fc
jmp 0x439361
cmp dword [esi + 0x5c], 8
jb 0x439346
mov edx, dword [edx]
mov ecx, edx
lea edi, [ecx + 2]
nop dword [eax + eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x439350
sub ecx, edi
sar ecx, 1
push ecx
push edx
lea ecx, [ebp - 0xc70]
call fcn.004114b0
cmp dword [ebp - 0xc44], 8
lea eax, [ebp - 0xc58]
cmovae eax, dword [ebp - 0xc58]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
lea eax, [ebp - 0xc58]
jne 0x4393b1
cmp dword [ebp - 0xc44], 8
cmovae eax, dword [ebp - 0xc58]
push eax
push 0x6c
call fcn.00450c85
add esp, 8
xor esi, esi
jmp 0x4399bb
push eax
lea ecx, [ebp - 0xca0]
call fcn.0040cde0
lea eax, [ebp - 0xc70]
mov byte [ebp - 4], 4
push eax
lea ecx, [ebp - 0xc88]
call fcn.0040cde0
lea eax, [ebp - 0xca0]
mov byte [ebp - 4], 5
push eax
call fcn.0044d8a7
lea eax, [ebp - 0xc88]
push eax
call fcn.0044d8a7
mov edx, dword [ebp - 0xc90]
lea ecx, [ebp - 0xc88]
add esp, 8
lea edi, [ebp - 0xca0]
cmp dword [ebp - 0xc74], 8
cmovae ecx, dword [ebp - 0xc88]
cmp dword [ebp - 0xc8c], 8
cmovae edi, dword [ebp - 0xca0]
cmp edx, dword [ebp - 0xc78]
jne 0x439443
test edx, edx
je 0x439475
sub edi, ecx
nop
mov ax, word [edi + ecx]
cmp ax, word [ecx]
jne 0x439443
add ecx, 2
sub edx, 1
jne 0x439430
jmp 0x439475
cmp dword [ebp - 0xc5c], 8
lea ecx, [ebp - 0xc70]
lea eax, [ebp - 0xc58]
cmovae ecx, dword [ebp - 0xc70]
cmp dword [ebp - 0xc44], 8
push ecx
cmovae eax, dword [ebp - 0xc58]
push eax
call fcn.00451020
add esp, 8
cmp dword [ebp - 0xc5c], 8
lea ecx, [ebp - 0xc70]
lea edx, [ebp - 0x218]
cmovae ecx, dword [ebp - 0xc70]
sub edx, ecx
movzx eax, word [ecx]
lea ecx, [ecx + 2]
mov word [edx + ecx - 2], ax
test ax, ax
jne 0x439491
lea edi, [ebp - 0x218]
add edi, 0xfffffffe
nop word [eax + eax]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x4394b0
mov eax, dword [0x5a3a10]
lea ecx, [ebp - 0x218]
mov dword [edi], eax
add ecx, 0xfffffffe
nop dword [eax]
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x4394d0
mov eax, dword [0x5a52e8]
mov dword [ecx], eax
mov eax, dword [0x5a52ec]
push 0x208
mov dword [ecx + 4], eax
lea eax, [ebp - 0x830]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0x420]
push 0
push eax
call fcn.0056f980
push 0x208
lea eax, [ebp - 0xa38]
push 0
push eax
call fcn.0056f980
add esp, 0x24
xor ecx, ecx
nop dword [eax]
movzx eax, word [ebp + ecx - 0x218]
lea ecx, [ecx + 2]
mov word [ebp + ecx - 0xa3a], ax
test ax, ax
jne 0x439530
lea eax, [ebp - 0x420]
mov ecx, esi
push eax
push str.e78cc
call fcn.00439050
lea eax, [ebp - 0x830]
mov ecx, esi
push eax
push str.73438
call fcn.00439050
lea eax, [ebp - 0x830]
push eax
call fcn.0057cd41
mov edi, eax
lea eax, [ebp - 0xa38]
push eax
call fcn.0057cd41
add esp, 8
mov ecx, edi
nop dword [eax]
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4395b6
test dx, dx
je 0x4395b2
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4395b6
add eax, 4
add ecx, 4
test dx, dx
jne 0x439590
xor eax, eax
jmp 0x4395bb
sbb eax, eax
or eax, 1
mov ebx, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x439773
push 0x208
lea eax, [ebp - 0xc40]
push 0
push eax
call fcn.0056f980
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0xc40]
push str.SYSTEMCurrentControlSet_services_s
push eax
call fcn.00411a40
add esp, 0x18
lea eax, [ebp - 0xca4]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0xc40]
push eax
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x439773
push 0x208
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.0056f980
add esp, 0xc
mov dword [ebp - 0xcac], 0x208
lea eax, [ebp - 0xcac]
push eax
lea eax, [ebp - 0x628]
push eax
push 0
push 0
push str.ImagePath
push dword [ebp - 0xca4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xca4]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea eax, [ebp - 0x628]
push eax
call fcn.0057cd41
add esp, 4
mov cx, word [eax]
cmp cx, word [edi]
jne 0x43969e
test cx, cx
je 0x43969a
mov cx, word [eax + 2]
cmp cx, word [edi + 2]
jne 0x43969e
add eax, 4
add edi, 4
test cx, cx
jne 0x439678
xor eax, eax
jmp 0x4396a3
sbb eax, eax
or eax, 1
test eax, eax
jne 0x439773
push 0x208
push eax
lea eax, [ebp - 0x628]
push eax
call fcn.0056f980
lea eax, [ebp - 0x420]
push eax
lea eax, [ebp - 0x628]
push str.SYSTEMCurrentControlSet_services_s
push eax
call fcn.00411a40
add esp, 0x18
lea eax, [ebp - 0xca4]
push eax
push 0xf003f
push 0
lea eax, [ebp - 0x628]
push eax
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x439773
mov dword [ebp - 0xcac], eax
lea eax, [ebp - 0xca8]
push eax
lea eax, [ebp - 0xcac]
mov dword [ebp - 0xca8], 4
push eax
push 0
push 0
push 0x5a5360
push dword [ebp - 0xca4]
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
push dword [ebp - 0xca4]
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
call edi
cmp dword [ebp - 0xcac], 2
jne 0x439779
lea eax, [ebp - 0x420]
push eax
lea ecx, [esi + 0xc0]
call fcn.0041e7b0
lea eax, [ebp - 0x830]
push eax
lea eax, [ebp - 0x420]
push eax
push 0x6d
call fcn.00450c85
add esp, 0xc
xor esi, esi
jmp 0x4399a5
mov edi, dword [sym.imp.ADVAPI32.dll_RegCloseKey]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x439783
mov eax, dword [esi]
push eax
mov ecx, esi
call fcn.00439a80
mov ecx, esi
call fcn.00438ae0
lea eax, [ebp - 0xca4]
mov dword [ebp - 0xca4], 0
push eax
push 0xf003f
push 0
push str.SoftWare
push reloc.WS2_32.dll_bind
call ebx
test eax, eax
jne 0x43981e
push eax
lea eax, [ebp - 0xca8]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push 0x5a1790
push dword [ebp - 0xca4]
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExW]
mov ebx, dword [ebp - 0xcb0]
test eax, eax
jne 0x439824
push ebx
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea eax, [eax*2 + 2]
push eax
push ebx
push 1
push 0
push str.e78cc
push dword [ebp - 0xca8]
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
mov eax, dword [ebp - 0xca4]
test eax, eax
je 0x439824
push eax
call edi
jmp 0x439824
mov ebx, dword [ebp - 0xcb0]
push ebx
push str.e78cc
mov ecx, esi
call fcn.00438750
lea eax, [ebp - 0x218]
mov ecx, esi
push eax
push str.73438
call fcn.00438750
call fcn.00427670
mov edx, eax
test edx, edx
je 0x43987f
cmp dword [esi + 0xbc], 8
lea ecx, [esi + 0xa8]
jb 0x439860
mov ecx, dword [ecx]
mov eax, dword [edx]
push ecx
lea ecx, [ebp - 0x218]
push ecx
push dword [ebp - 0xcb4]
mov ecx, edx
push dword [ebp - 0xcb8]
push ebx
call dword [eax + 0x84]
push 0x7d0
call dword [sym.imp.KERNEL32.dll_Sleep]
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
jne 0x4398b0
push 0x6e
call fcn.00450c85
add esp, 4
xor esi, esi
jmp 0x4399a5
cmp dword [esi + 0x2c], 8
lea ecx, [esi + 0x18]
jb 0x4398bb
mov ecx, dword [ecx]
cmp dword [esi + 0x14], 8
mov eax, esi
jb 0x4398c5
mov eax, dword [esi]
push 0
push 0
push 0x5a178c
push 0
push 0
lea edx, [ebp - 0x218]
push edx
push 1
push 2
push 0x110
push 0xf01ff
push ecx
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov edi, eax
test edi, edi
jne 0x43990e
push 0x6f
call fcn.00450c85
add esp, 4
push ebx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor esi, esi
jmp 0x4399a5
cmp dword [esi + 0x44], 8
lea eax, [esi + 0x30]
jb 0x439919
mov eax, dword [eax]
mov dword [ebp - 0xcbc], eax
lea eax, [ebp - 0xcbc]
push eax
push 1
push edi
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2W]
push edi
mov edi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call edi
push ebx
call edi
push 0xf003f
push 0
push 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov ebx, eax
test ebx, ebx
je 0x43999d
push 0x70
call fcn.00450c85
add esp, 4
cmp dword [esi + 0x14], 8
jb 0x439962
mov esi, dword [esi]
push 0xf003f
push esi
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceW]
mov esi, eax
test esi, esi
je 0x439993
push 0
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceW]
test eax, eax
jne 0x43998e
push 0x72
call fcn.00450c85
add esp, 4
push esi
call edi
jmp 0x43999d
push 0x71
call fcn.00450c85
add esp, 4
push ebx
call edi
mov esi, 1
lea ecx, [ebp - 0xc88]
call fcn.0040a530
lea ecx, [ebp - 0xca0]
call fcn.0040a530
mov edx, dword [ebp - 0xc44]
cmp edx, 8
jb 0x4399fb
mov ecx, dword [ebp - 0xc58]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4399f1
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x439a74
push edx
push ecx
call fcn.0045ec62
add esp, 8
mov edx, dword [ebp - 0xc5c]
xor eax, eax
mov dword [ebp - 0xc48], 0
mov dword [ebp - 0xc44], 7
mov word [ebp - 0xc58], ax
cmp edx, 8
jb 0x439a54
mov ecx, dword [ebp - 0xc70]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x439a4a
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x439a79
push edx
push ecx
call fcn.0045ec62
add esp, 8
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045ef18
mov esp, ebp
pop ebp
ret 0xc
call fcn.00572b79
call fcn.00572b79
int3