Function at 0x5020f8
Capabilities:
Accept command line arguments
Impersonate user

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
xor ecx, ecx
mov dword [ebp - 0x78], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0x5023b2
push dword fs:[eax]
mov dword fs:[eax], esp
lea eax, [ebp - 0x74]
xor ecx, ecx
mov edx, 0x44
call fcn.00403b7c
mov dword [ebp - 0x74], 0x44
mov dword [ebp - 0x48], 1
mov word [ebp - 0x44], 0xa
mov byte [ebp - 6], 0
mov eax, dword [ebp - 4]
xor edx, edx
mov dword [eax], edx
xor eax, eax
mov dword [ebp - 0x18], eax
mov eax, 0x201
call fcn.00402f38
mov dword [ebp - 0xc], eax
mov eax, 0x201
call fcn.00402f38
mov dword [ebp - 0x10], eax
mov eax, pe_nt_image_headers32
call fcn.00402f38
mov dword [ebp - 0x14], eax
mov eax, 0x208
call fcn.00402f38
mov dword [ebp - 0x1c], eax
mov eax, 0x208
call fcn.00402f38
mov dword [ebp - 0x20], eax
xor eax, eax
push ebp
push 0x502395
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [ebp - 0xc]
xor ecx, ecx
mov edx, 0x201
call fcn.00403b7c
mov eax, dword [ebp - 0x10]
xor ecx, ecx
mov edx, 0x201
call fcn.00403b7c
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403b7c
mov eax, dword [ebp - 0x1c]
xor ecx, ecx
mov edx, 0x208
call fcn.00403b7c
mov eax, dword [ebp - 0x20]
xor ecx, ecx
mov edx, 0x208
call fcn.00403b7c
mov bl, 1
xor ebx, ebx
push 0x201
mov eax, dword [ebp - 0x14]
push eax
push pe_nt_image_headers32
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp - 0x10]
mov edx, 0x201
mov eax, dword [ebp - 0xc]
call fcn.00504154
mov esi, eax
mov eax, dword [0x55aea4]
mov eax, dword [eax]
movzx edi, word [eax + 0x44]
mov eax, dword [0x55aea4]
mov eax, dword [eax]
mov dx, 0xfff5
call fcn.004798bc
sub esi, 1
jb 0x502240
sub esi, 0x4c6
je 0x502341
jmp 0x502348
call fcn.00537ec4
or al, byte [ebp - 5]
je 0x5022d4
push 0x208
mov eax, dword [ebp - 0x1c]
push eax
mov eax, dword [0x55d7f8]
push eax
call sub.kernel32.dll_GetModuleFileNameW
mov ecx, 0x208
mov edx, dword [ebp - 0x1c]
mov eax, dword [ebp - 0x20]
call fcn.00408d7c
mov eax, dword [ebp - 0x20]
push eax
call sub.shlwapi.dll_PathRemoveFileSpecW
call sub.kernel32.dll_GetCommandLineW
mov dword [ebp - 0x1c], eax
push 0x5023c4
mov eax, dword [ebp - 0x1c]
push eax
call sub.shlwapi.dll_StrCatW
lea eax, [ebp - 0x30]
push eax
lea eax, [ebp - 0x74]
push eax
mov eax, dword [ebp - 0x20]
push eax
push 0
push 0x30
mov eax, dword [ebp - 0x1c]
push eax
push 0
push 1
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
push eax
call fcn.005018d8
test eax, eax
je 0x5022d4
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403b7c
push 0
call sub.kernel32.dll_ExitProcess_1
mov eax, dword [ebp - 4]
push eax
push 0
push 2
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x10]
push eax
call sub.advapi32.dll_LogonUserW
test eax, eax
je 0x502335
mov eax, dword [ebp - 0x14]
xor ecx, ecx
mov edx, pe_nt_image_headers32
call fcn.00403b7c
mov eax, dword [ebp - 4]
mov eax, dword [eax]
push eax
call sub.advapi32.dll_ImpersonateLoggedOnUser
test eax, eax
je 0x502315
mov byte [ebp - 6], 1
jmp 0x502348
call sub.kernel32.dll_GetLastError_1
test eax, eax
jns 0x502323
call fcn.004046a8
lea edx, [ebp - 0x78]
call fcn.0040f110
mov eax, dword [ebp - 0x78]
call fcn.0044d130
jmp 0x502348
call sub.kernel32.dll_GetLastError_1
mov dword [ebp - 0x18], eax
mov bl, 1
jmp 0x502348
push 0
call sub.kernel32.dll_ExitProcess_1
mov eax, dword [0x55aea4]
mov eax, dword [eax]
mov edx, edi
call fcn.004798bc
cmp bl, 1
je 0x5021e9
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x50239c
mov eax, dword [ebp - 0x20]
call fcn.00402f54
mov eax, dword [ebp - 0x1c]
call fcn.00402f54
mov eax, dword [ebp - 0x14]
call fcn.00402f54
mov eax, dword [ebp - 0x10]
call fcn.00402f54
mov eax, dword [ebp - 0xc]
call fcn.00402f54
ret