Function at 0x5339b0
Capabilities:
Create service
Delete registry value
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x5df664
mov eax, dword fs:[0]
push eax
sub esp, 0xc8
push ebx
push ebp
push esi
push edi
mov eax, dword [0x66d4f4]
xor eax, esp
push eax
lea eax, [esp + 0xdc]
mov dword fs:[0], eax
xor ebp, ebp
push 0xf003f
push ebp
push ebp
mov dword [esp + 0x28], ebp
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
mov dword [esp + 0x20], edi
cmp edi, ebp
mov dword [esp + 0xe4], ebp
jne 0x533ad4
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040a750
mov byte [esp + 0xe4], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
lea eax, [esp + 0x60]
push str.OpenSCManager:
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 2
jb 0x533a5f
mov eax, dword [eax + 4]
jmp 0x533a62
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x145
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x3c], esi
jb 0x533a96
mov edx, dword [esp + 0x28]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409510
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
push ebp
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x534064
mov ecx, dword [esp + 0x104]
mov edx, dword [esp + 0x100]
mov ebx, dword [esp + 0xfc]
mov eax, dword [esp + 0xf8]
push ebp
mov esi, dword [esp + 0xf0]
push ebp
push ecx
mov ecx, dword [esp + 0x100]
push ebp
push edx
mov edx, dword [esp + 0x104]
push ebx
push 1
push eax
push ecx
push 0xf01ff
push edx
push esi
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
cmp eax, ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
jne 0x533c21
call ebp
push 1
push 2
lea ecx, [esp + 0x64]
mov edi, eax
call fcn.0040a750
push edi
push 0x603990
push esi
lea eax, [esp + 0x68]
push str.CreateService
push eax
mov byte [esp + 0xf8], 3
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x60]
call fcn.00408c00
cmp dword [eax + 0x18], 0x10
mov byte [esp + 0xe4], 4
jb 0x533b97
mov eax, dword [eax + 4]
jmp 0x533b9a
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x15a
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x3c], 0x10
jb 0x533bcf
mov edx, dword [esp + 0x28]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409510
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
cmp edi, 0x431
je 0x533c2a
cmp edi, 0x430
je 0x533c2a
mov ecx, dword [esp + 0x20]
push ecx
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
or eax, 0xffffffff
jmp 0x534064
push eax
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
jmp 0x533c2e
mov edi, dword [esp + 0x20]
lea edx, [esp + 0x1c]
push edx
push 0xf003f
push 0
push str.SYSTEMCurrentControlSetServices
push reloc.WS2_32.dll_bind
mov dword [esp + 0x30], 0
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
test eax, eax
jne 0x533f9f
mov ecx, dword [esp + 0x1c]
push eax
lea eax, [esp + 0x1c]
push eax
push 0
push 0xf003f
push 0
push 0
push 0
push esi
push ecx
call dword [sym.imp.ADVAPI32.dll_RegCreateKeyExA]
test eax, eax
jne 0x533ebb
mov esi, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
push 4
lea edx, [esp + 0xfc]
push edx
push 4
push eax
mov eax, dword [esp + 0x28]
push str.Start
push eax
call esi
mov edx, dword [esp + 0x18]
push 4
lea ecx, [esp + 0xf8]
push ecx
push 4
push 0
push 0x60505c
push edx
call esi
mov eax, dword [esp + 0x18]
push str.DeleteFlag
push eax
call dword [sym.imp.ADVAPI32.dll_RegDeleteValueA]
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040a750
lea ecx, [esp + 0x5c]
push ebx
push ecx
mov byte [esp + 0xec], 5
call fcn.00409270
add esp, 8
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.00408c00
cmp dword [eax + 0x14], 3
jbe 0x533d0c
cmp byte [ebx + 1], 0x3a
mov byte [esp + 0x17], 1
je 0x533d11
mov byte [esp + 0x17], 0
lea ecx, [esp + 0x40]
call fcn.0040b640
cmp byte [esp + 0x17], 0
je 0x533daf
push 0x2e
push ebx
call fcn.005be930
add esp, 8
test eax, eax
je 0x533daf
mov ecx, str..sys
lea edi, [ecx + 1]
lea esp, [esp]
mov dl, byte [ecx]
add ecx, 1
test dl, dl
jne 0x533d40
sub ecx, edi
push ecx
push str..sys
push eax
call fcn.005c1e85
add esp, 0xc
test eax, eax
jne 0x533daf
push 0x63a990
lea ecx, [esp + 0x28]
call fcn.0040b540
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 6
call fcn.00482940
lea ecx, [esp + 0x24]
mov byte [esp + 0xe4], 5
call fcn.0040b640
push ebx
lea ecx, [esp + 0x60]
push 0x6018f0
push ecx
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.00408c00
mov edi, eax
lea eax, [esp + 0x24]
push eax
lea ecx, [esp + 0x60]
mov byte [esp + 0xe8], 7
call fcn.00408c00
mov edi, dword [edi + 0x14]
mov ebx, 0x10
cmp dword [eax + 0x18], ebx
jb 0x533de7
mov eax, dword [eax + 4]
jmp 0x533dea
add eax, 4
mov ecx, dword [esp + 0x18]
push edi
push eax
push 2
push 0
push str.ImagePath
push ecx
call esi
cmp dword [esp + 0x3c], ebx
jb 0x533e0f
mov edx, dword [esp + 0x28]
push edx
call fcn.005a1b1d
add esp, 4
cmp dword [esp + 0x58], ebx
mov dword [esp + 0x3c], 0xf
mov dword [esp + 0x38], 0
mov byte [esp + 0x28], 0
jb 0x533e37
mov eax, dword [esp + 0x44]
push eax
call fcn.005a1b1d
add esp, 4
mov edx, dword [esp + 0x100]
test edx, edx
je 0x533e6d
cmp byte [edx], 0
je 0x533e6d
mov eax, edx
lea edi, [eax + 1]
lea esp, [esp]
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x533e50
mov ecx, dword [esp + 0x18]
sub eax, edi
push eax
push edx
push 1
push 0
push str.Group
push ecx
call esi
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409510
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005d9cc4
mov edx, dword [esp + 0x20]
mov edi, dword [esp + 0x24]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x53405b
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040a750
mov byte [esp + 0xe4], 8
call ebp
push eax
push 0x604e44
push esi
lea ecx, [esp + 0x68]
push str.RegCreateKey
push ecx
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea edx, [esp + 0x40]
push edx
lea ecx, [esp + 0x60]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 9
jb 0x533f29
mov eax, dword [eax + 4]
jmp 0x533f2c
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x18f
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x58], esi
jb 0x533f60
mov eax, dword [esp + 0x44]
push eax
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409510
lea ecx, [esp + 0xa8]
push ecx
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005d9cc4
mov edx, dword [esp + 0x20]
add esp, 4
push edx
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
jmp 0x53405b
push 1
push 2
lea ecx, [esp + 0x64]
call fcn.0040a750
mov byte [esp + 0xe4], 0xa
call ebp
push eax
lea eax, [esp + 0x60]
push str.RegOpenKey
push eax
call fcn.00409270
add esp, 8
mov ecx, eax
call fcn.00419990
lea ecx, [esp + 0x40]
push ecx
lea ecx, [esp + 0x60]
call fcn.00408c00
mov esi, 0x10
cmp dword [eax + 0x18], esi
mov byte [esp + 0xe4], 0xb
jb 0x533ff5
mov eax, dword [eax + 4]
jmp 0x533ff8
add eax, 4
push eax
push str.BaseLib::CNTServiceManager::Install
push 0x196
push str..commonNTServiceManager.cpp
push 0xf0000000
call fcn.00408f70
mov ecx, eax
call fcn.00512650
cmp dword [esp + 0x58], esi
jb 0x53402c
mov edx, dword [esp + 0x44]
push edx
call fcn.005a1b1d
add esp, 4
lea ecx, [esp + 0xa8]
mov byte [esp + 0xe4], 0
call fcn.00409510
lea eax, [esp + 0xa8]
push eax
mov dword [esp + 0xac], vtable.std::ios_base.0
call fcn.005d9cc4
add esp, 4
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
xor eax, eax
mov ecx, dword [esp + 0xdc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xd4
ret 0x1c