Function at 0x40f530
Capabilities:
Get session user name
Impersonate user
Print debug messages

Disassembly:
push ebp
mov ebp, esp
push ecx
push ebx
push esi
push edi
push 0
mov dword [ebp - 4], 0
call fcn.0040ea70
mov esi, eax
test esi, esi
je 0x40f5b2
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.LoadUserProfileEx
push 0x38e
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 0x38e
jmp 0x40f7d8
push 0x20
call fcn.0041e8bb
add esp, 4
test eax, eax
je 0x40f5ce
xorps xmm0, xmm0
movdqu xmmword [eax], xmm0
movdqu xmmword [eax + 0x10], xmm0
jmp 0x40f5d0
xor eax, eax
mov edi, dword [ebp + 0xc]
mov dword [edi], eax
test eax, eax
jne 0x40f641
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, eax
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.LoadUserProfileEx
push 0x395
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 0x395
jmp 0x40f7d8
push 0x20a
mov dword [eax], 0x20
call fcn.0041e8ed
mov ecx, dword [edi]
add esp, 4
mov dword [ecx + 8], eax
mov eax, dword [edi]
mov eax, dword [eax + 8]
test eax, eax
jne 0x40f6ca
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, eax
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.LoadUserProfileEx
push 0x39e
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 0x39e
jmp 0x40f7d8
push 0x20a
push 0
push eax
call fcn.00537300
add esp, 0xc
mov dword [ebp - 4], 0x105
lea eax, [ebp - 4]
push eax
mov eax, dword [edi]
push dword [eax + 8]
call dword [sym.imp.ADVAPI32.dll_GetUserNameW]
test eax, eax
jne 0x40f759
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov esi, eax
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.LoadUserProfileEx
push 0x3aa
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 0x3aa
jmp 0x40f7d8
mov eax, dword [edi]
mov ebx, dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push dword [eax + 8]
call ebx
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
push dword [edi]
push dword [ebp + 8]
call dword [sym.imp.USERENV.dll_LoadUserProfileW]
test eax, eax
jne 0x40f7f9
call dword [sym.imp.KERNEL32.dll_GetLastError]
push str._n______________________________________________________________________________________________n
mov esi, eax
call ebx
push 0x800
call fcn.005369fe
push 0x800
mov edi, eax
push 0
push edi
call fcn.00537300
push esi
push str.LoadUserProfileEx
push 0x3b7
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 0x3b7
push str.LoadUserProfileEx
call fcn.00404610
add esp, 0xc
test edi, edi
je 0x40f7f2
push edi
call fcn.005369c6
add esp, 4
push str._n______________________________________________________________________________________________n
call ebx
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret