Function at 0x10021630
Capabilities:
Create process on windows

Disassembly:
mov eax, 0x3908
call fcn.1002ece0
push ebp
push esi
push edi
xor ebp, ebp
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x50]
mov dword [esp + 0x4c], ebp
rep stosd dword es:[edi], eax
mov dword [esp + 0x3c], eax
mov esi, dword [esp + 0x3918]
mov dword [esp + 0x40], eax
mov ecx, 0x9ff
lea edi, [esp + 0x1115]
mov dword [esp + 0x44], eax
mov byte [esp + 0x1114], al
push ebp
rep stosd dword es:[edi], eax
mov cl, byte [esi]
mov dword [esp + 0x14], ebp
stosw word es:[edi], ax
mov byte [esp + 0x28], cl
lea ecx, [esp + 0x28]
mov dword [esp + 0x3c], ebp
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x24], ebp
mov dword [esp + 0x10], ebp
mov dword [esp + 0x20], ebp
stosb byte es:[edi], al
call dword [sym.imp.MSVCP60.dll_private:_void___thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Tidy_bool_]
mov edx, dword [sym.imp.MSVCP60.dll_unsigned_int_const_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::npos]
lea ecx, [esp + 0x24]
mov eax, dword [edx]
push eax
push ebp
push esi
call dword [sym.imp.MSVCP60.dll_public:_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char______thiscall_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::assign_class_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char___const___unsigned_int__unsigned_int_]
lea ecx, [esp + 0x24]
push ecx
call fcn.10022840
push ebp
call fcn.10023210
xor edx, edx
add esp, 8
cmp edx, str.userenv.dll
mov dword [esp + 0x1110], ebp
je 0x10021706
mov edi, str.userenv.dll
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10021706
push str.userenv.dll
call fcn.100231e0
add esp, 4
mov dword [esp + 0x1110], eax
mov edi, dword [esp + 0x1110]
push ebx
push str.CreateEnvironmentBlock
push edi
call fcn.100231f0
push str.DestroyEnvironmentBlock
push edi
mov esi, eax
call fcn.100231f0
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x48]
push 0x10036444
push eax
mov dword [esp + 0x50], ebp
call fcn.10020f40
add esp, 0x18
test al, al
je 0x10021a32
mov ecx, dword [esp + 0x38]
push ecx
push ebp
push 0x1f0fff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov edi, eax
cmp edi, ebp
jne 0x10021788
mov esi, dword [esp + 0x2c]
cmp esi, ebp
jne 0x1002176d
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
call fcn.10013550
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
push str._comm__createProcessAsUser__s__OpenProcess_explorer__failed:__s
push 0x10036454
jmp 0x100217c4
lea edx, [esp + 0x18]
push edx
push 0xf01ff
push edi
call dword [sym.imp.ADVAPI32.dll_OpenProcessToken]
test eax, eax
jne 0x100217db
mov esi, dword [esp + 0x2c]
cmp esi, ebp
jne 0x100217ab
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
call fcn.10013550
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
push str._comm__createProcessAsUser__s__OpenProcessToken_explorer__failed:__s
push 0x100364a0
call fcn.100132b0
push eax
call fcn.100132c0
add esp, 0x10
mov dword [esp + 0x14], ebp
jmp 0x10021b74
mov ecx, dword [esp + 0x18]
lea eax, [esp + 0x1c]
push eax
push 1
push 1
push ebp
push 0x2000000
push ecx
call dword [sym.imp.ADVAPI32.dll_DuplicateTokenEx]
lea edx, [esp + 0x50]
mov dword [esp + 0x50], 0x44
push edx
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
mov al, byte [esp + 0x3924]
test al, al
je 0x10021827
mov word [esp + 0x80], 5
mov dword [esp + 0x7c], 1
jmp 0x1002184c
mov eax, 0xffffff9c
mov dword [esp + 0x68], ebp
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x6c], ebp
mov word [esp + 0x80], bp
mov dword [esp + 0x7c], 7
mov eax, dword [esp + 0x18]
push ebp
lea ecx, [esp + 0x24]
push eax
push ecx
call esi
test eax, eax
je 0x100219f8
mov edx, dword [esp + 0x20]
xor ecx, ecx
mov eax, edx
cmp word [eax], bp
jne 0x10021874
cmp word [eax + 2], bp
je 0x1002187a
inc ecx
add eax, 2
jmp 0x10021869
push ebp
push ebp
lea eax, [esp + 0x1120]
push 0x2800
push eax
push ecx
push edx
push ebp
push ebp
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
call fcn.100190b0
test al, al
je 0x1002190b
xor eax, eax
mov cl, byte [esp + eax + 0x1118]
test cl, cl
jne 0x100218b4
mov cl, byte [esp + eax + 0x1119]
test cl, cl
je 0x100218bc
inc eax
cmp eax, 0x2800
jl 0x1002189e
push str.CommonProgramFiles_x86_
lea ecx, [esp + 0x111c]
push eax
push ecx
call fcn.10021540
push str.CommonProgramW6432
lea edx, [esp + 0x1128]
push eax
push edx
call fcn.10021540
push str.ProgramFiles_x86_
push eax
lea eax, [esp + 0x1138]
push eax
call fcn.10021540
push str.ProgramW6432
lea ecx, [esp + 0x1140]
push eax
push ecx
call fcn.10021540
add esp, 0x30
mov eax, dword [esp + 0x2c]
cmp eax, ebp
jne 0x10021918
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
lea edx, [esp + 0x3c]
lea ecx, [esp + 0x50]
push edx
push ecx
lea edx, [esp + 0x1120]
push ebp
push edx
push 0xc000030
push ebp
push ebp
push ebp
push eax
mov eax, dword [esp + 0x40]
push ebp
push eax
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserA]
test eax, eax
je 0x100219aa
mov edx, dword [esp + 0x3c]
cmp edx, 0xffffffff
je 0x100219aa
mov eax, dword [esp + 0x3928]
mov ecx, dword [esp + 0x44]
cmp eax, ebp
je 0x10021961
mov dword [eax], ecx
mov dword [eax + 4], edx
mov eax, dword [esp + 0x2c]
mov dword [esp + 0x14], ecx
cmp eax, ebp
jne 0x10021972
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ecx
push eax
push str._comm__createProcessAsUser__s__successed__pid_d
push 0x10036658
lea ecx, [esp + 0x20]
call fcn.100132b0
push eax
call fcn.100132c0
mov al, byte [esp + 0x3930]
add esp, 0x10
test al, al
je 0x100219df
mov ecx, dword [esp + 0x3c]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
jmp 0x100219df
mov esi, dword [esp + 0x2c]
cmp esi, ebp
jne 0x100219b8
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
call fcn.10013550
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
push str._comm__createProcessAsUser__s__failed:__s
push 0x10036694
call fcn.100132b0
push eax
call fcn.100132c0
add esp, 0x10
mov eax, dword [esp + 0x40]
cmp eax, 0xffffffff
je 0x10021b74
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x10021b74
mov esi, dword [esp + 0x2c]
cmp esi, ebp
jne 0x10021a06
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push ebp
call fcn.10013550
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
push str._comm__createProcessAsUser__d__CreateEnvironmentBlock_failed:__s
push 0x100366c8
call fcn.100132b0
push eax
call fcn.100132c0
add esp, 0x10
jmp 0x10021b74
push ebp
call fcn.10023210
xor edx, edx
add esp, 4
xor ebx, ebx
cmp edx, str.Kernel32.dll
je 0x10021a67
mov edi, str.Kernel32.dll
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10021a67
push str.Kernel32.dll
call fcn.100231e0
add esp, 4
mov ebx, eax
push ebp
call fcn.10023210
xor eax, eax
add esp, 4
cmp eax, str.wtsapi32.dll
je 0x10021a97
mov edi, str.wtsapi32.dll
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
je 0x10021a97
push str.wtsapi32.dll
call fcn.100231e0
add esp, 4
mov ebp, eax
push str.WTSGetActiveConsoleSessionId
push ebx
call fcn.100231f0
push str.WTSQueryUserToken
push ebp
mov esi, eax
call fcn.100231f0
add esp, 0x10
mov edi, eax
test esi, esi
je 0x10021aff
call esi
cmp eax, 0xffffffff
jne 0x10021b03
mov eax, dword [esp + 0x2c]
test eax, eax
jne 0x10021acc
mov eax, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push eax
push str._comm__createProcessAsUser__s__failed:_No_session_attached_to_the_console__WTSGetActiveConsoleSessionId_failed_
push 0x10036544
lea ecx, [esp + 0x1c]
call fcn.100132b0
push eax
call fcn.100132c0
push ebp
mov dword [esp + 0x24], 0
call fcn.10023210
push ebx
call fcn.10023210
add esp, 0x14
jmp 0x10021b6e
mov eax, dword [esp + 0x10]
test edi, edi
je 0x10021b5f
lea ecx, [esp + 0x18]
push ecx
push eax
call edi
test eax, eax
jne 0x10021b5f
mov esi, dword [esp + 0x2c]
test esi, esi
jne 0x10021b21
mov esi, dword [sym.imp.MSVCP60.dll_char_const__private:_static_char_const____cdecl_std::basic_string_char__struct_std::char_traits_char___class_std::allocator_char__::_Nullstr_void_::_2::_C]
push 0
call fcn.10013550
add esp, 4
lea ecx, [esp + 0x10]
push eax
push esi
push str._comm__createProcessAsUser__s__WTSQueryUserToken_failed:__s
push 0x100365c0
call fcn.100132b0
push eax
call fcn.100132c0
push ebp
mov dword [esp + 0x28], 0
call fcn.10023210
push ebx
call fcn.10023210
add esp, 0x18
jmp 0x10021b6e
push ebp
call fcn.10023210
push ebx
call fcn.10023210
add esp, 8
mov edi, dword [esp + 0x24]
xor ebp, ebp
mov eax, dword [esp + 0x20]
pop ebx
cmp eax, ebp
je 0x10021b82
push eax
call dword [esp + 0x4c]
cmp edi, ebp
je 0x10021b91
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
jmp 0x10021b97
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x14]
cmp eax, ebp
je 0x10021ba2
push eax
call esi
mov eax, dword [esp + 0x18]
cmp eax, ebp
je 0x10021bad
push eax
call esi
mov edx, dword [esp + 0x1110]
push edx
call fcn.10023210
mov ecx, dword [esp + 0x2c]
add esp, 4
cmp ecx, ebp
pop edi
pop esi
pop ebp
je 0x10021bed
mov al, byte [ecx - 1]
test al, al
je 0x10021be3
cmp al, 0xff
je 0x10021be3
dec al
mov byte [ecx - 1], al
mov eax, dword [esp + 4]
add esp, 0x3908
ret
dec ecx
push ecx
call fcn.1002eb22
add esp, 4
mov eax, dword [esp + 4]
add esp, 0x3908
ret