Function at 0x403010
Capabilities:
Create directory
Create service
Modify service
Persist via windows service
Start service

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x444
mov eax, dword [0x48706c]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
call fcn.004033c0
mov edi, dword [0x48a76c]
cmp dword [edi + 0x24], 0
jbe 0x403067
lea eax, [ebp - 0x410]
push eax
call fcn.0044a19f
mov edi, dword [0x48a76c]
add esp, 4
mov ecx, dword [edi + 0x24]
sub ecx, dword [ebp - 0x410]
mov eax, ecx
imul eax, ecx
cmp eax, 0x15f90
jle 0x403067
sub dword [edi + 0x1c], ecx
sub dword [edi + 0x20], ecx
push 1
lea esi, [edi + 0x11c]
push 0x47a494
mov ecx, esi
call fcn.00403bd0
mov ebx, eax
cmp ebx, 0xffffffff
je 0x403162
nop word [eax + eax]
cmp dword [esi + 0x10], ebx
mov ecx, ebx
mov dword [ebp - 0x418], 0
cmovb ecx, dword [esi + 0x10]
cmp dword [esi + 0x14], 0x10
mov dword [ebp - 0x414], 0xf
mov byte [ebp - 0x428], 0
jb 0x4030bc
mov esi, dword [esi]
push ecx
push esi
lea ecx, [ebp - 0x428]
call fcn.00405f60
cmp dword [ebp - 0x414], 0x10
lea eax, [ebp - 0x428]
cmovae eax, dword [ebp - 0x428]
push eax
call fcn.0044a47c
mov edx, dword [ebp - 0x414]
add esp, 4
cmp edx, 0x10
jb 0x403120
mov ecx, dword [ebp - 0x428]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403116
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4033a8
push edx
push ecx
call fcn.0042bafb
add esp, 8
mov edi, dword [0x48a76c]
lea eax, [ebx + 1]
push eax
push 0x47a494
mov dword [ebp - 0x418], 0
lea esi, [edi + 0x11c]
mov dword [ebp - 0x414], 0xf
mov ecx, esi
mov byte [ebp - 0x428], 0
call fcn.00403bd0
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403090
push edi
sub esp, 0x18
lea eax, [edi + 0x11c]
mov ecx, esp
push eax
call fcn.00403fc0
lea eax, [ebp - 0x428]
push eax
call fcn.0040d3b0
mov edx, dword [ebp - 0x414]
add esp, 0x20
cmp edx, 0x10
jb 0x4031bd
mov ecx, dword [ebp - 0x428]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x4031b3
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4033a8
push edx
push ecx
call fcn.0042bafb
add esp, 8
mov esi, dword [0x48a76c]
push 0xf003f
push 0
push 0
mov dword [ebp - 0x418], 0
mov dword [ebp - 0x414], 0xf
mov byte [ebp - 0x428], 0
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerA]
mov edi, eax
test edi, edi
jne 0x4031fe
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x4032c4
push 0x47a49c
lea edx, [esi + 0x11c]
lea ecx, [ebp - 0x440]
call fcn.004079d0
mov edx, eax
add esp, 4
cmp dword [edx + 0x14], 0x10
jb 0x403221
mov edx, dword [edx]
cmp dword [esi + 0x100], 0x10
lea ecx, [esi + 0xec]
jb 0x403232
mov ecx, dword [ecx]
cmp dword [esi + 0xe8], 0x10
lea eax, [esi + 0xd4]
jb 0x403243
mov eax, dword [eax]
push 0
push 0
push 0
push 0
push 0
push edx
push 1
push 2
push 0x10
push 0xf01ff
push ecx
push eax
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceA]
mov edx, dword [ebp - 0x42c]
mov ebx, eax
cmp edx, 0x10
jb 0x40329e
mov ecx, dword [ebp - 0x440]
inc edx
mov eax, ecx
cmp edx, 0x1000
jb 0x403294
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x4033ad
push edx
push ecx
call fcn.0042bafb
add esp, 8
mov dword [ebp - 0x430], 0
mov dword [ebp - 0x42c], 0xf
mov byte [ebp - 0x440], 0
test ebx, ebx
jne 0x4032ea
push edi
call dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push 2
mov ecx, 0x489650
call fcn.00404af0
push eax
call fcn.00407920
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0042bab5
mov esp, ebp
pop ebp
ret
cmp dword [esi + 0x118], 0x10
lea eax, [esi + 0x104]
jb 0x4032fb
mov eax, dword [eax]
mov dword [ebp - 0x40c], eax
lea eax, [ebp - 0x40c]
push eax
push 1
push ebx
call dword [sym.imp.ADVAPI32.dll_ChangeServiceConfig2A]
push 0
push 0
push ebx
call dword [sym.imp.ADVAPI32.dll_StartServiceA]
mov esi, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
push ebx
call esi
push edi
call esi
mov edx, 0x47a498
mov ecx, 0x489650
call fcn.00407670
push eax
call fcn.00407920
add esp, 4
lea eax, [ebp - 0x408]
push 0x400
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x403397
sub esp, 0x18
lea ecx, [ebp - 0x408]
mov edx, esp
lea esi, [ecx + 1]
mov dword [edx + 0x10], 0
mov dword [edx + 0x14], 0xf
mov byte [edx], 0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x403377
sub ecx, esi
lea eax, [ebp - 0x408]
push ecx
push eax
mov ecx, edx
call fcn.00405f60
call fcn.004034d0
add esp, 0x18
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0042bab5
mov esp, ebp
pop ebp
ret
call fcn.0044acc1
call fcn.0044acc1
int3