Function at 0x40fb80
Capabilities:
Create process on windows
Create process suspended
Get session user name
Impersonate user
Print debug messages
Terminate process

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
mov eax, dword [0x5c2b50]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
xor edi, edi
mov dword [ebp - 0x418], eax
push 0x40
lea eax, [ebp - 0x480]
mov dword [ebp - 0x41c], ebx
push edi
push eax
mov dword [ebp - 0x428], 0xffffffff
mov dword [ebp - 0x420], 0xffffffff
mov dword [ebp - 0x430], edi
mov dword [ebp - 0x484], edi
call fcn.00537300
lea eax, [ebp - 0x420]
mov dword [ebp - 0x424], edi
push eax
lea eax, [ebp - 0x428]
mov dword [ebx], edi
xorps xmm0, xmm0
push eax
movdqu xmmword [ebp - 0x440], xmm0
call fcn.0040e8c0
mov ebx, eax
add esp, 0x14
test ebx, ebx
je 0x40fc9b
mov edi, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str._n______________________________________________________________________________________________n
call edi
push 0x800
call fcn.005369fe
push 0x800
mov esi, eax
push 0
push esi
call fcn.00537300
push ebx
push str.RunProcessAsUser
push 0x3df
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push esi
call fcn.00406430
add esp, 0x30
push esi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push esi
push 0x3df
push str.RunProcessAsUser
call fcn.00404610
add esp, 0xc
test esi, esi
je 0x40fc81
push esi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call edi
pop edi
pop esi
mov eax, ebx
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
push 0
push dword [ebp - 0x420]
lea eax, [ebp - 0x424]
push eax
call sub.USERENV.dll_CreateEnvironmentBlock
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40fd65
call ebx
mov esi, eax
test esi, esi
je 0x4100b2
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
push 0
push eax
mov dword [ebp - 0x418], eax
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x3e6
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push dword [ebp - 0x418]
call fcn.00406430
add esp, 0x30
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x418]
push 0x3e6
push str.RunProcessAsUser
call fcn.00404610
mov eax, dword [ebp - 0x418]
add esp, 0xc
test eax, eax
je 0x40fd55
push eax
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4100b2
xor eax, eax
mov dword [ebp - 0x484], 0x44
push eax
mov dword [ebp - 0x47c], str.winsta0default
mov dword [ebp - 0x458], 1
mov word [ebp - 0x454], ax
mov dword [ebp - 0x480], eax
call fcn.0040ea70
mov esi, eax
test esi, esi
je 0x40fe38
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push str.__n_Error_at_ImpersonateAsExplorer__n
call ebx
push str._n______________________________________________________________________________________________n
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push 0
push edi
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x3f3
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push edi
call fcn.00406430
add esp, 0x30
push edi
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push edi
push 0x3f3
push str.RunProcessAsUser
call fcn.00404610
add esp, 0xc
test edi, edi
je 0x40fe1e
push edi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
push 0x20
mov dword [ebp - 0x42c], edi
call fcn.0041e8bb
mov edi, eax
add esp, 4
test edi, edi
je 0x410314
xorps xmm0, xmm0
movdqu xmmword [edi], xmm0
push 0x20a
movdqu xmmword [edi + 0x10], xmm0
mov dword [edi], 0x20
call fcn.0041e8ed
add esp, 4
mov dword [edi + 8], eax
test eax, eax
jne 0x40ff1c
call ebx
push str._n______________________________________________________________________________________________n
mov esi, eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
push 0
push eax
mov dword [ebp - 0x418], eax
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x407
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push dword [ebp - 0x418]
call fcn.00406430
add esp, 0x30
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x418]
push 0x407
push str.RunProcessAsUser
call fcn.00404610
mov eax, dword [ebp - 0x418]
add esp, 0xc
test eax, eax
je 0x40ff0c
push eax
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4100b2
push 0x20a
push 0
push eax
call fcn.00537300
add esp, 0xc
mov dword [ebp - 0x42c], 0x105
lea eax, [ebp - 0x42c]
push eax
push dword [edi + 8]
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x40ffee
call ebx
push str._n______________________________________________________________________________________________n
mov esi, eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
push 0
push eax
mov dword [ebp - 0x418], eax
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x414
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push dword [ebp - 0x418]
call fcn.00406430
add esp, 0x30
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x418]
push 0x414
push str.RunProcessAsUser
call fcn.00404610
mov eax, dword [ebp - 0x418]
add esp, 0xc
test eax, eax
je 0x40ffde
push eax
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4100b2
push dword [edi + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
call ebx
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
push edi
push dword [ebp - 0x420]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
jne 0x410133
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
push str._n______________________________________________________________________________________________n
mov esi, eax
call ebx
push 0x800
call fcn.005369fe
push 0x800
push 0
push eax
mov dword [ebp - 0x418], eax
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x423
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push dword [ebp - 0x418]
call fcn.00406430
add esp, 0x30
push dword [ebp - 0x418]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x418]
push 0x423
push str.RunProcessAsUser
call fcn.00404610
mov eax, dword [ebp - 0x418]
add esp, 0xc
test eax, eax
je 0x4100a5
push eax
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 0x424]
call sub.USERENV.dll_DestroyEnvironmentBlock
test edi, edi
je 0x4100fe
push dword [edi + 8]
call fcn.0041e8e8
add esp, 4
mov dword [edi + 8], 0
push dword [edi + 0x1c]
push dword [ebp - 0x428]
call dword [sym.imp.USERENV.dll_UnloadUserProfile]
test eax, eax
jne 0x4100f5
push edi
call fcn.0041e8e8
add esp, 4
xor edi, edi
call ebx
mov esi, eax
push edi
call fcn.0041e8e8
add esp, 4
mov eax, dword [ebp - 0x428]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp eax, 0xffffffff
je 0x410112
push eax
call edi
mov eax, dword [ebp - 0x420]
cmp eax, 0xffffffff
je 0x410120
push eax
call edi
mov ecx, dword [ebp - 4]
mov eax, esi
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00536ab6
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x484]
push eax
push 0
push dword [ebp - 0x424]
push 0x430
push 0
push 0
push 0
push dword [ebp - 0x418]
push 0
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x41029c
push str._nError_at_CreateProcessAsUserW._n
call ebx
push dword [ebp - 0x418]
call ebx
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov esi, eax
lea eax, [ebp - 0x20c]
push 0xa
push eax
push esi
call fcn.0053825e
add esp, 0xc
lea eax, [ebp - 0x20c]
push eax
call ebx
push 4
lea eax, [ebp - 0x430]
mov dword [ebp - 0x430], 0
push eax
push 0xc
push dword [ebp - 0x428]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
lea eax, [ebp - 0x440]
push eax
lea eax, [ebp - 0x484]
push eax
push 0
push dword [ebp - 0x424]
push 0x430
push 0
push 0
push 0
push dword [ebp - 0x418]
push 0
push dword [ebp - 0x420]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
jne 0x410232
push str._nError_at_CreateProcessAsUserW._n
call ebx
push dword [ebp - 0x418]
call ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
lea eax, [ebp - 0x414]
push 0xa
push eax
push esi
call fcn.0053825e
add esp, 0xc
lea eax, [ebp - 0x414]
push eax
jmp 0x4100aa
push dword [ebp + 0xc]
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x410260
cmp dword [ebp + 0x10], 1
jne 0x4100ac
push 0
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x41c]
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x4100ac
push str._nError_at_GetExitCodeProcess._n
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov esi, eax
mov eax, dword [ebp - 0x41c]
mov dword [eax], 0
jmp 0x4100b2
push dword [ebp + 0xc]
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x4102ca
cmp dword [ebp + 0x10], 1
jne 0x4100ac
push 0
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_TerminateProcess]
push dword [ebp - 0x41c]
push dword [ebp - 0x440]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
jne 0x410302
push str._nError_at_GetExitCodeProcess._n
call ebx
mov ebx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ebx
mov esi, eax
mov eax, dword [ebp - 0x41c]
mov dword [eax], 0
jmp 0x4100b2
push str.CDService___
call ebx
push dword [ebp - 0x418]
jmp 0x4100aa
xor edi, edi
call ebx
push str._n______________________________________________________________________________________________n
mov esi, eax
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push 0x800
call fcn.005369fe
push 0x800
push edi
push eax
mov dword [ebp - 0x41c], eax
call fcn.00537300
push esi
push str.RunProcessAsUser
push 0x3fe
push str.c:devdragon_release_sync_srcdragonupdateservicedragonupdateservice_systemservices.cpp
push str.CD_Module
push str._s_____s____d____s___returned__d
push 0x800
push dword [ebp - 0x41c]
call fcn.00406430
add esp, 0x30
push dword [ebp - 0x41c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringA]
push dword [ebp - 0x41c]
push 0x3fe
push str.RunProcessAsUser
call fcn.00404610
mov eax, dword [ebp - 0x41c]
add esp, 0xc
test eax, eax
je 0x4103a5
push eax
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
jmp 0x4100b2