Function at 0x403830
Capabilities:
Create service
Get session user name
Persist via windows service
Set registry value

Disassembly:
push 0xffffffffffffffff
push 0x483e2e
mov eax, dword fs:[0]
push eax
sub esp, 0x8b4
mov eax, dword [0x4a4720]
xor eax, esp
mov dword [esp + 0x8b0], eax
push ebp
push esi
push edi
mov eax, dword [0x4a4720]
xor eax, esp
push eax
lea eax, [esp + 0x8c4]
mov dword fs:[0], eax
xor eax, eax
push 0x206
push eax
lea ecx, [esp + 0xaa]
mov dword [esp + 0x8d4], 0
push ecx
xor esi, esi
mov word [esp + 0xac], ax
call fcn.00464a00
add esp, 0xc
push 0x104
lea edx, [esp + 0xa4]
push edx
push esi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
push 0xf003f
push esi
push esi
call dword [sym.imp.ADVAPI32.dll_OpenSCManagerW]
mov edi, eax
test edi, edi
je 0x403b4e
push esi
push esi
push esi
push esi
push esi
lea eax, [esp + 0xb4]
push eax
push 1
push 2
push 0x110
push 0xf01ff
push str.DesUpdateSvcTmp
push str.DesUpdateSvcTmp
push edi
call dword [sym.imp.ADVAPI32.dll_CreateServiceW]
mov ebp, dword [sym.imp.ADVAPI32.dll_CloseServiceHandle]
test eax, eax
je 0x403b37
push eax
call ebp
xor ecx, ecx
push 0x206
push ecx
lea edx, [esp + 0x2b2]
push edx
mov dword [esp + 0x24], esi
mov word [esp + 0x2b4], cx
call fcn.00464a00
xor eax, eax
push 0x40e
push eax
lea ecx, [esp + 0x4c6]
push ecx
mov word [esp + 0x4c8], ax
call fcn.00464a00
push str.DesUpdateSvcTmp
lea edx, [esp + 0x2c4]
push str.SYSTEMCurrentControlSet_services_s
push edx
call fcn.00461fd7
add esp, 0x24
lea eax, [esp + 0x18]
push eax
push 0x20006
push esi
lea ecx, [esp + 0x2b4]
push ecx
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x403b49
xor edx, edx
push 0x7e
push edx
lea eax, [esp + 0x2a]
push eax
mov word [esp + 0x2c], dx
call fcn.00464a00
add esp, 0xc
lea ecx, [esp + 0x1c]
push ecx
lea edx, [esp + 0x24]
push edx
mov dword [esp + 0x24], 0x40
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
je 0x403b49
push 0x48e58c
lea ecx, [esp + 0x14]
call fcn.00401ed0
mov byte [esp + 0x8cc], 1
cmp dword [0x4a9954], esi
je 0x4039ef
mov eax, dword [0x4a995c]
push eax
push 0x48e194
lea ecx, [esp + 0x18]
push 0x48e590
push ecx
call fcn.00403800
add esp, 0x10
push 0x48e58c
lea ecx, [esp + 0x18]
call fcn.00401ed0
mov byte [esp + 0x8cc], 2
cmp dword [0x4a997c], 0
je 0x403a2c
mov edx, dword [0x4a9980]
push edx
push str._mod
lea eax, [esp + 0x1c]
push 0x48e590
push eax
call fcn.00403800
add esp, 0x10
cmp dword [0x4a9948], 0
mov ecx, 0x48e1b4
jne 0x403a3f
mov ecx, 0x48e58c
cmp dword [esp + 0x8d8], 0
mov eax, 0x48e1c4
jne 0x403a53
mov eax, 0x48e58c
mov edx, dword [esp + 0x14]
push 0x48e19c
push 0x48e1bc
push edx
mov edx, dword [esp + 0x1c]
push edx
push ecx
mov ecx, dword [esp + 0x8e8]
push eax
lea eax, [esp + 0x38]
push eax
push 0x48e18c
push ecx
push 0x48e1a4
lea edx, [esp + 0xc8]
push edx
lea eax, [esp + 0x4dc]
push str.__s___s___s___s___s___s__s__s__s__s__s
push eax
call fcn.00461fd7
lea eax, [esp + 0x4e4]
add esp, 0x34
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x403aa7
sub eax, edx
mov edx, dword [esp + 0x18]
sar eax, 1
lea eax, [eax + eax + 2]
push eax
lea ecx, [esp + 0x4b4]
push ecx
push 2
push 0
push str.ImagePath
push edx
call dword [sym.imp.ADVAPI32.dll_RegSetValueExW]
xor ecx, ecx
test eax, eax
sete cl
mov byte [esp + 0x8cc], 1
mov eax, dword [esp + 0x14]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov esi, ecx
mov ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403b0a
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov byte [esp + 0x8cc], 0
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x403b49
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
push edi
call ebp
jmp 0x403b50
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
cmp eax, 0x431
sete cl
mov esi, ecx
push edi
call ebp
jmp 0x403b50
xor esi, esi
mov dword [esp + 0x8cc], 0xffffffff
mov eax, dword [esp + 0x8d4]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x403b7e
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [esp + 0x8c4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
mov ecx, dword [esp + 0x8b0]
xor ecx, esp
call fcn.00461706
add esp, 0x8c0
ret