Function at 0x489171
Capabilities:
Create process on windows
Create process suspended

Disassembly:
mov eax, 0x4098
call fcn.005b3d10
mov eax, dword [0x6ccd44]
xor eax, esp
mov dword [esp + 0x4094], eax
mov eax, dword [esp + 0x40a4]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x40ac]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x40a0]
push ebx
mov ebx, dword [esp + 0x40a4]
shr eax, 0xf
xor ebx, 0x8000
and eax, 1
mov dword [esp + 0x18], ecx
push ebp
mov ebp, dword [esp + 0x40b0]
test eax, eax
push esi
cmove ebx, dword [esp + 0x40ac]
xor ecx, ecx
mov esi, dword [esp + 0x40a8]
push edi
mov dword [esp + 0x3c], eax
lea edi, [esp + 0x48]
xor eax, eax
mov dword [esp + 0x40], edx
stosd dword es:[edi], eax
push 0x44
push ecx
mov dword [esp + 0x3c], ebp
stosd dword es:[edi], eax
mov dword [esp + 0x40], ebx
mov dword [esp + 0x24], ecx
mov dword [esp + 0x1c], ecx
stosd dword es:[edi], eax
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], ecx
stosd dword es:[edi], eax
lea eax, [esp + 0x60]
push eax
call fcn.005b5fd0
add esp, 0xc
cmp ebx, 5
je 0x489235
test ebx, ebx
je 0x48931c
call dword [sym.imp.KERNEL32.dll_WTSGetActiveConsoleSessionId]
mov dword [esp + 0x28], eax
cmp eax, 0xffffffff
je 0x4896d7
test ebx, ebx
je 0x48931c
cmp ebx, 4
je 0x48931c
call dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
lea ecx, [esp + 0x14]
push ecx
push 2
pop edi
push edi
push eax
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x489281
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x216
mov edx, 0x722e24
xor ecx, ecx
call fcn.00488a50
add esp, 0xc
jmp 0x4896d7
lea eax, [esp + 0x18]
push eax
push 1
push edi
push 0
push 0x2000000
push dword [esp + 0x28]
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
test eax, eax
jne 0x4892bc
push dword [esp + 0x14]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x217
mov edx, 0x722e44
jmp 0x489272
mov eax, dword [esp + 0x28]
cmp ebx, 5
push 4
cmove eax, dword [esp + 0x34]
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push eax
push 0xc
push dword [esp + 0x24]
call dword [sym.imp.ADVAPI32.dll_SetTokenInformation]
test eax, eax
jne 0x48930c
push dword [esp + 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [esp + 0x18]
call esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push edi
push 0x219
mov edx, 0x722e64
jmp 0x489272
cmp ebx, edi
mov eax, str.Winsta0Winlogon
cmovne eax, dword [esp + 0x60]
mov dword [esp + 0x60], eax
test esi, esi
je 0x4893ec
mov eax, dword [esi]
test eax, eax
je 0x4893ec
mov ecx, dword [esi + 4]
test ecx, ecx
jne 0x48933e
mov dword [esp + 0x1c], eax
jmp 0x4893ec
xor ecx, ecx
xor edi, edi
mov dword [esp + 0x20], ecx
test eax, eax
je 0x489373
mov eax, esi
mov eax, dword [eax]
test eax, eax
je 0x489363
push 0x10000
push eax
call fcn.005ea5b0
pop ecx
pop ecx
mov ecx, dword [esp + 0x20]
inc eax
add ecx, eax
inc edi
mov dword [esp + 0x20], ecx
lea eax, [esi + edi*4]
cmp dword [eax], 0
jne 0x48934c
push 0x22b
push 0x722ea8
lea eax, [edi - 1]
add eax, ecx
push 1
push eax
mov dword [esp + 0x54], eax
call fcn.005e7f10
xor edi, edi
mov dword [esp + 0x2c], eax
and dword [esp + 0x40], edi
add esp, 0x10
mov dword [esp + 0x20], 1
cmp dword [esi], edi
je 0x4893ec
mov eax, dword [esi]
mov ebp, dword [esp + 0x1c]
mov ebx, dword [esp + 0x30]
push eax
mov ecx, 0x722ec8
test edi, edi
mov eax, 0x72a323
cmovne eax, ecx
push eax
mov eax, dword [esp + 0x4c]
sub eax, ebx
push str._s_s
push eax
lea eax, [ebx + ebp]
push eax
call fcn.0040117f
add ebx, eax
add esp, 0x14
inc edi
mov eax, dword [esi + edi*4]
test eax, eax
jne 0x4893b1
mov ebx, dword [esp + 0x38]
mov ebp, dword [esp + 0x34]
push 0
push 0
push 0x23d
push 0x722ed4
push 1
push 0x4c
call fcn.005e7f10
add esp, 0x10
mov ecx, eax
push 0x3c
pop edx
call fcn.004811d1
mov esi, dword [esp + 0x2c]
mov edi, eax
mov dword [esp + 0x3c], edi
pop ecx
pop ecx
cmp ebx, 4
je 0x489435
push dword [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00488ec4
pop ecx
mov dword [edi + 0x20], eax
pop ecx
mov dword [eax + 0x20], edi
mov dword [edi + 0xc], esi
mov eax, dword [esi + 0x10]
mov dword [edi + 0x38], eax
mov dword [esp + 0x58], 0x44
cmp ebx, 4
je 0x4894c6
push dword [esp + 0x2c]
push ecx
mov ecx, esi
call fcn.00488ec4
pop ecx
pop ecx
push dword [esp + 0x2c]
mov dword [edi + 0x18], eax
push ecx
mov ecx, esi
mov dword [eax + 0x20], edi
call fcn.00488ec4
pop ecx
pop ecx
mov dword [edi + 0x1c], eax
mov dword [eax + 0x20], edi
mov ecx, dword [edi + 0x18]
add ecx, 0x44
call fcn.00488e4c
mov ecx, dword [edi + 0x1c]
add ecx, 0x40
call fcn.00488e4c
mov ecx, dword [edi + 0x20]
add ecx, 0x40
call fcn.00488e4c
mov eax, dword [edi + 0x20]
mov eax, dword [eax + 0x44]
mov dword [esp + 0x98], eax
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 0x40]
mov dword [esp + 0x90], eax
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + 0x44]
or dword [esp + 0x84], 0x100
mov dword [esp + 0x94], eax
test ebp, ebp
je 0x4895ec
xor ecx, ecx
mov edi, ebp
mov dword [esp + 0x24], ecx
cmp dword [edi], 0
je 0x489531
push 0
push 0
push 0xffffffffffffffff
push dword [edi + 4]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov esi, eax
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push 0x722ef4
push eax
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add esi, eax
xor eax, eax
push eax
push eax
push 0xffffffffffffffff
push dword [edi]
push eax
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ecx, dword [esp + 0x24]
add eax, esi
add ecx, eax
mov dword [esp + 0x24], ecx
add edi, 8
jne 0x4894d6
lea esi, [ecx + ecx]
cmp esi, 0xffffffef
jae 0x489557
push 0x266
push 0x722ef8
lea eax, [ecx*2 + 0x10]
push 1
push eax
call fcn.005e7f10
add esp, 0x10
jmp 0x489559
xor eax, eax
push 0
push 0
mov edx, esi
mov ecx, eax
call fcn.004811d1
mov edi, dword [esp + 0x3c]
mov ebx, eax
pop ecx
pop ecx
xor esi, esi
cmp dword [ebp], 0
je 0x4895e6
mov eax, dword [ebx - 0x10]
cdq
sub eax, edx
sar eax, 1
push eax
lea eax, [ebx + esi*2]
push eax
push 0xffffffffffffffff
push dword [ebp]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
dec eax
add esi, eax
mov eax, dword [ebx - 0x10]
cdq
sub eax, edx
sar eax, 1
sub eax, esi
push eax
lea eax, [ebx + esi*2]
push eax
push 0xffffffffffffffff
push 0x722f18
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
dec eax
add esi, eax
mov eax, dword [ebx - 0x10]
cdq
sub eax, edx
sar eax, 1
sub eax, esi
push eax
lea eax, [ebx + esi*2]
push eax
push 0xffffffffffffffff
push dword [ebp + 4]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
add esi, eax
add ebp, 8
jne 0x489570
mov ebp, ebx
mov ebx, dword [esp + 0x38]
test ebx, ebx
je 0x4895f9
cmp ebx, 4
jne 0x4896f2
mov esi, dword [esp + 0x3c]
lea eax, [esp + 0x48]
push eax
xor ecx, ecx
lea eax, [esp + 0x5c]
push eax
push ecx
mov eax, esi
neg eax
push ebp
sbb eax, eax
and eax, 0x208
or eax, 0x8000400
push eax
xor eax, eax
cmp ebx, 4
setne al
or edx, 0xffffffff
push eax
push ecx
push ecx
mov ecx, dword [esp + 0x3c]
lea eax, [esp + 0xc0]
push 0x1000
push eax
call fcn.00480c85
pop ecx
pop ecx
mov ecx, dword [esp + 0x60]
or edx, 0xffffffff
push eax
lea eax, [esp + 0x20c4]
push 0x1000
push eax
call fcn.00480c85
pop ecx
pop ecx
push eax
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
jne 0x4896f6
mov esi, dword [esp + 0x1c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp ebx, 4
je 0x489694
mov ecx, dword [edi + 0x20]
call fcn.00488d2f
mov ecx, dword [edi + 0x1c]
call fcn.00488d2f
mov ecx, dword [edi + 0x18]
call fcn.00488d2f
cmp dword [esp + 0x20], 0
je 0x4896a5
push 1
push esi
call fcn.005e7dd0
pop ecx
pop ecx
mov ecx, edi
call fcn.00481286
cmp dword [esp + 0x14], 0
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
je 0x4896bf
push dword [esp + 0x14]
call esi
cmp dword [esp + 0x18], 0
je 0x4896cc
push dword [esp + 0x18]
call esi
test ebp, ebp
je 0x4896d7
mov ecx, ebp
call fcn.00481286
xor eax, eax
mov ecx, dword [esp + 0x40a4]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.005b35b0
add esp, 0x4098
ret
mov esi, dword [esp + 0x3c]
test ebx, ebx
je 0x48976b
lea eax, [esp + 0x48]
push eax
lea eax, [esp + 0x5c]
push eax
xor eax, eax
neg esi
push eax
sbb esi, esi
or edx, 0xffffffff
push ebp
and esi, 0x208
or esi, 0x8000400
push esi
mov esi, dword [esp + 0x30]
mov ecx, esi
push 1
push eax
push eax
lea eax, [esp + 0xc0]
push 0x1000
push eax
call fcn.00480c85
pop ecx
pop ecx
mov ecx, dword [esp + 0x60]
or edx, 0xffffffff
push eax
lea eax, [esp + 0x20c4]
push 0x1000
push eax
call fcn.00480c85
pop ecx
pop ecx
push eax
push dword [esp + 0x40]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
test eax, eax
je 0x489671
jmp 0x48976f
mov esi, dword [esp + 0x1c]
test ebp, ebp
je 0x48977a
mov ecx, ebp
call fcn.00481286
cmp dword [esp + 0x20], 0
je 0x48978b
push 1
push esi
call fcn.005e7dd0
pop ecx
pop ecx
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, 4
je 0x4897c3
mov eax, dword [edi + 0x1c]
push dword [eax + 0x44]
call esi
mov eax, dword [edi + 0x1c]
and dword [eax + 0x44], 0
mov eax, dword [edi + 0x20]
push dword [eax + 0x44]
call esi
mov eax, dword [edi + 0x20]
and dword [eax + 0x44], 0
mov eax, dword [edi + 0x18]
push dword [eax + 0x40]
call esi
mov eax, dword [edi + 0x18]
and dword [eax + 0x40], 0
mov eax, dword [esp + 0x48]
mov dword [edi + 0x2c], eax
cmp dword [esp + 0x4c], 0
je 0x4897d7
push dword [esp + 0x4c]
call esi
mov eax, dword [esp + 0x50]
mov dword [edi + 0x10], eax
cmp dword [esp + 0x14], 0
je 0x4897f0
push dword [esp + 0x14]
call esi
and dword [esp + 0x14], 0
cmp dword [esp + 0x18], 0
je 0x4897fd
push dword [esp + 0x18]
call esi
mov eax, edi
jmp 0x4896d9