Function at 0x493b10
Capabilities:
Create process on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x7c
mov edx, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [ebp + 0x18]
xor ecx, ecx
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov eax, dword [edi + 0xc]
mov dword [edx + 8], eax
mov eax, dword [edi + 0x14]
mov dword [edx + 0xc], eax
mov dword [ebp - 8], ecx
cmp dword [edi + 0x24], ecx
je 0x493b4d
cmp dword [0x502374], 0x1e
mov eax, 8
cmovge ecx, eax
mov dword [ebp - 8], ecx
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x1c]
cmp byte [esi], 0x22
jne 0x493b7c
mov ecx, esi
lea edx, [ecx + 1]
lea ecx, [ecx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493b60
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [esi + 1]
push eax
push ebx
call fcn.0048aaa0
mov esi, eax
mov dword [ebp + 0xc], esi
mov eax, dword [edi + 0x20]
cmp eax, 1
je 0x493bab
cmp eax, 2
je 0x493bab
push ebx
push 0x10
push esi
push 0x4c543c
lea eax, [ebp - 0x1c]
push eax
mov dword [ebp - 0x1c], 0
call fcn.0048e950
test eax, eax
jne 0x493c0d
mov esi, dword [ebp - 0x1c]
jmp 0x493c0a
push ebx
push 0x10
push esi
push dword [edi + 0x1c]
lea eax, [ebp - 0x20]
push eax
mov dword [ebp - 0x20], 0
call fcn.0048e950
mov dword [ebp + 0xc], eax
test eax, eax
je 0x493c07
cmp dword [edi + 0x28], 0
je 0x4944cd
push 0
push esi
push str._progname:
push dword [edi + 0x1c]
push str._currdir:
push str.filepath_merge_failed.
push ebx
call fcn.0048a950
push eax
push dword [ebp + 0xc]
mov eax, dword [edi + 0x28]
push ebx
call eax
mov eax, dword [ebp + 0xc]
add esp, 0x28
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov esi, dword [ebp - 0x20]
mov dword [ebp + 0xc], esi
mov edx, dword [ebp + 0xc]
cmp byte [edx], 0
je 0x493c2d
movzx eax, byte [esi]
push eax
call fcn.004773e6
add esp, 4
test eax, eax
jne 0x493c94
inc esi
cmp byte [esi], al
jne 0x493c15
mov edx, dword [ebp + 0xc]
mov dword [ebp - 4], edx
mov eax, dword [ebp + 0x10]
mov ecx, 0x4c543c
mov dword [ebp + 0x1c], ecx
test eax, eax
je 0x493ce5
lea edi, [eax + 4]
mov esi, dword [edi]
test esi, esi
je 0x493cdf
mov al, byte [esi]
test al, al
je 0x493c71
movzx eax, al
push eax
call fcn.004773e6
add esp, 4
test eax, eax
jne 0x493cb8
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x493c56
mov ecx, dword [ebp + 0x1c]
mov eax, dword [edi]
cmp byte [eax], 0
je 0x493cb8
push 0
push eax
push 0x4cf708
push ecx
push ebx
call fcn.0048a950
mov ecx, eax
add esp, 0x14
mov dword [ebp + 0x1c], ecx
add edi, 4
jmp 0x493c46
mov edx, dword [ebp + 0xc]
push 0
push 0x4d5ec0
push edx
push 0x4d5ec0
push ebx
call fcn.0048a950
mov edx, dword [ebp + 0xc]
add esp, 0x14
mov dword [ebp - 4], eax
jmp 0x493c30
push 0
push 0x4d5ec0
push dword [edi]
push 0x4d5ec4
push dword [ebp + 0x1c]
push ebx
call fcn.0048a950
add esp, 0x18
mov ecx, eax
mov dword [ebp + 0x1c], eax
add edi, 4
jmp 0x493c46
mov edi, dword [ebp + 0x18]
mov edx, dword [ebp + 0xc]
mov eax, dword [edi + 0x20]
test eax, eax
je 0x493e58
cmp eax, 4
je 0x493e58
mov ecx, edx
lea esi, [ecx + 1]
mov edi, edi
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493d00
sub ecx, esi
cmp ecx, 4
jb 0x493e2e
lea esi, [edx - 4]
add esi, ecx
push str..bat
push esi
call fcn.004aae70
add esp, 8
test eax, eax
je 0x493d3f
push str..cmd
push esi
call fcn.004aae70
add esp, 8
test eax, eax
jne 0x493e2e
push str.COMSPEC
call fcn.004870f7
mov esi, eax
add esp, 4
test esi, esi
je 0x493e6e
cmp byte [esi], 0x22
jne 0x493d7e
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493d60
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [esi + 1]
push eax
push ebx
call fcn.0048aaa0
mov edx, eax
mov dword [ebp + 0xc], edx
jmp 0x493da9
push esi
mov dword [ebp + 0xc], esi
call fcn.004947d0
add esp, 4
test eax, eax
je 0x493da6
push 0
push 0x4d5ec0
push esi
push 0x4d5ec0
push ebx
call fcn.0048a950
add esp, 0x14
mov esi, eax
mov edx, dword [ebp + 0xc]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp + 0x18], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493db1
sub ecx, dword [ebp + 0x18]
cmp ecx, 0xb
jb 0x493df2
lea eax, [edx - 0xb]
add eax, ecx
push str.command.com
push eax
call fcn.004aae70
add esp, 8
test eax, eax
jne 0x493df2
push eax
push dword [ebp + 0x1c]
push dword [ebp - 4]
push str.__C
push esi
push ebx
call fcn.0048a950
add esp, 0x18
jmp 0x493f69
push dword [ebp + 0x1c]
push ebx
call fcn.00493aa0
mov ecx, dword [ebp - 4]
add esp, 8
cmp byte [ecx], 0x22
push 0
push 0x4d5ec0
push eax
je 0x493e28
push 0x4d5ec0
push ecx
push str.__C___
push esi
push ebx
call fcn.0048a950
add esp, 0x20
jmp 0x493f69
push ecx
jmp 0x493f5a
push 0
push dword [ebp + 0x1c]
push dword [ebp - 4]
push ebx
call fcn.0048a950
add esp, 0x10
cmp dword [edi + 0x20], 3
mov dword [ebp + 0x18], eax
jne 0x493f6c
mov dword [ebp + 0xc], 0
jmp 0x493f6c
push str.COMSPEC
call fcn.004870f7
mov esi, eax
add esp, 4
mov dword [ebp + 0x18], esi
test esi, esi
jne 0x493e90
mov eax, dword [edi + 0x28]
test eax, eax
je 0x493e82
push str.COMSPEC_envar_is_not_set
push 0x16
push ebx
call eax
add esp, 0xc
pop edi
pop esi
mov eax, 0x16
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov al, byte [esi]
cmp al, 0x22
jne 0x493ebe
mov ecx, esi
lea edx, [ecx + 1]
jmp 0x493ea0
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493ea0
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [esi + 1]
push eax
push ebx
call fcn.0048aaa0
mov edx, eax
mov dword [ebp + 0xc], edx
jmp 0x493ee2
mov edx, esi
mov dword [ebp + 0xc], edx
test al, al
je 0x493edf
movzx eax, byte [esi]
push eax
call fcn.004773e6
add esp, 4
test eax, eax
jne 0x493f2e
inc esi
cmp byte [esi], al
jne 0x493ec7
mov edx, dword [ebp + 0xc]
mov esi, dword [ebp + 0x18]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp + 0x18], eax
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493ef0
sub ecx, dword [ebp + 0x18]
cmp ecx, 0xb
jb 0x493f4d
lea eax, [edx - 0xb]
add eax, ecx
push str.command.com
push eax
call fcn.004aae70
add esp, 8
test eax, eax
jne 0x493f4d
push eax
push dword [ebp + 0x1c]
push dword [ebp - 4]
push str.__C
push esi
push ebx
call fcn.0048a950
add esp, 0x18
jmp 0x493f69
push 0
push 0x4d5ec0
push dword [ebp + 0x18]
push 0x4d5ec0
push ebx
call fcn.0048a950
mov edx, dword [ebp + 0xc]
add esp, 0x14
mov esi, eax
jmp 0x493ee2
push 0
push 0x4d5ec0
push dword [ebp + 0x1c]
push dword [ebp - 4]
push str.__C__
push esi
push ebx
call fcn.0048a950
add esp, 0x1c
mov dword [ebp + 0x18], eax
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x494092
mov ecx, dword [edi + 0x20]
cmp ecx, 2
je 0x494092
cmp ecx, 4
je 0x494092
mov ecx, dword [eax]
xor esi, esi
mov edx, 1
mov dword [ebp - 4], edx
test ecx, ecx
je 0x493fc5
lea esp, [esp]
lea eax, [ecx + 1]
mov dword [ebp + 0x1c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x493fa6
sub ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x14]
inc ecx
inc esi
add edx, ecx
mov ecx, dword [eax + esi*4]
mov dword [ebp - 4], edx
test ecx, ecx
jne 0x493fa0
test esi, esi
jne 0x493fc9
inc edx
mov dword [ebp - 4], edx
lea eax, [edx + edx]
push eax
push ebx
call fcn.0048b000
or dword [ebp - 8], 0x400
mov dword [ebp - 0x10], eax
mov esi, eax
mov eax, dword [ebp + 0x14]
xor ecx, ecx
mov dword [ebp + 0x1c], ecx
cmp dword [eax], ecx
je 0x49404a
mov ecx, eax
lea ecx, [ecx]
mov edx, dword [ecx]
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp + 0x10], eax
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x494000
sub ecx, dword [ebp + 0x10]
lea eax, [ecx + 1]
mov dword [ebp - 0x18], eax
lea eax, [ebp - 4]
push eax
push esi
lea eax, [ebp - 0x18]
push eax
push edx
call fcn.00494bc0
mov dword [ebp + 0x10], eax
test eax, eax
jne 0x494059
push eax
push esi
call fcn.00471f24
mov ecx, dword [ebp + 0x14]
lea esi, [eax + 2]
mov eax, dword [ebp + 0x1c]
inc eax
add esp, 8
cmp dword [ecx + eax*4], 0
lea ecx, [ecx + eax*4]
mov dword [ebp + 0x1c], eax
jne 0x493ff0
test eax, eax
jne 0x494052
xor eax, eax
mov word [esi], ax
add esi, 2
xor eax, eax
mov word [esi], ax
jmp 0x494099
cmp dword [edi + 0x28], 0
je 0x4944cd
mov ecx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x14]
push 0
push dword [eax + ecx*4]
push str.utf8_to_ucs2_conversion_failed_on_this_string:
push ebx
call fcn.0048a950
push eax
push dword [ebp + 0x10]
mov eax, dword [edi + 0x28]
push ebx
call eax
mov eax, dword [ebp + 0x10]
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov dword [ebp - 0x10], 0
mov ecx, dword [ebp + 8]
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 0x18]
mov dword [ecx + 0x10], eax
mov dword [ebp + 0x14], 0
mov dword [ebp + 0x1c], 0
mov dword [ebp + 0x10], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0xc], 0
test esi, esi
je 0x494140
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4940d8
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x28], eax
add eax, 6
mov dword [ebp - 0x24], eax
add eax, eax
push eax
push ebx
call fcn.0048b000
lea ecx, [ebp - 0x24]
push ecx
push eax
mov dword [ebp - 0x18], eax
lea eax, [ebp - 0x28]
push eax
push esi
call fcn.00494bc0
mov dword [ebp + 0xc], eax
test eax, eax
je 0x494140
cmp dword [edi + 0x28], 0
je 0x4944cd
push 0
push esi
push str.utf8_to_ucs2_conversion_failed_on_progname:
push ebx
call fcn.0048a950
push eax
push dword [ebp + 0xc]
mov eax, dword [edi + 0x28]
push ebx
call eax
mov eax, dword [ebp + 0xc]
add esp, 0x1c
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov esi, dword [ebp + 0x18]
test esi, esi
je 0x4941b0
mov ecx, esi
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x494150
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x20], eax
mov dword [ebp + 0xc], eax
add eax, eax
push eax
push ebx
call fcn.0048b000
lea ecx, [ebp + 0xc]
push ecx
push eax
mov dword [ebp - 0x14], eax
lea eax, [ebp - 0x20]
push eax
push esi
call fcn.00494bc0
mov esi, eax
test esi, esi
je 0x4941b0
cmp dword [edi + 0x28], 0
je 0x4941a5
mov eax, dword [ebp + 0x18]
push 0
push eax
push str.utf8_to_ucs2_conversion_failed_on_cmdline:
push ebx
call fcn.0048a950
push eax
mov eax, dword [edi + 0x28]
push esi
push ebx
call eax
add esp, 0x1c
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x494207
lea edx, [ecx + 1]
lea ebx, [ebx]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4941c0
sub ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x1c], eax
mov dword [ebp + 0x18], eax
add eax, eax
push eax
push ebx
call fcn.0048b000
lea ecx, [ebp + 0x18]
push ecx
push eax
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x1c]
push eax
push dword [edi + 0x1c]
call fcn.00494bc0
mov esi, eax
test esi, esi
je 0x494207
cmp dword [edi + 0x28], 0
je 0x4941a5
push 0
push dword [edi + 0x1c]
push str.utf8_to_ucs2_conversion_failed_on_currdir:
jmp 0x494194
push 0x44
lea eax, [ebp - 0x7c]
push 0
push eax
call fcn.00472dd0
add esp, 0xc
cmp dword [edi + 0x24], 0
mov dword [ebp - 0x7c], 0x44
je 0x49422e
or dword [ebp - 0x50], 1
xor eax, eax
mov word [ebp - 0x4c], ax
push 0x50223c
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [edi + 8]
mov ebx, dword [sym.imp.KERNEL32.dll_GetStdHandle]
mov esi, dword [sym.imp.KERNEL32.dll_SetHandleInformation]
test eax, eax
je 0x494252
cmp dword [eax + 4], 0
jne 0x494274
mov eax, dword [edi + 0x10]
test eax, eax
je 0x49425f
cmp dword [eax + 4], 0
jne 0x494274
mov eax, dword [edi + 0x18]
test eax, eax
je 0x494350
cmp dword [eax + 4], 0
je 0x494350
or dword [ebp - 0x50], 0x100
push 0xfffffffffffffff6
call ebx
mov ecx, dword [edi + 8]
mov dword [ebp - 0x44], eax
test ecx, ecx
je 0x4942c2
cmp dword [ecx + 4], 0
je 0x4942c2
lea ecx, [ebp + 0x14]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x4942ad
and dword [ebp + 0x14], 1
je 0x4942ad
push 0
push 1
push dword [ebp - 0x44]
call esi
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [ebp - 0x44], eax
cmp eax, 0xffffffff
je 0x4942c2
push 1
push 1
push eax
call esi
push 0xfffffffffffffff5
call ebx
mov ecx, dword [edi + 0x10]
mov dword [ebp - 0x40], eax
test ecx, ecx
je 0x494309
cmp dword [ecx + 4], 0
je 0x494309
lea ecx, [ebp + 0x1c]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x4942f4
and dword [ebp + 0x1c], 1
je 0x4942f4
push 0
push 1
push dword [ebp - 0x40]
call esi
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 4]
mov dword [ebp - 0x40], eax
cmp eax, 0xffffffff
je 0x494309
push 1
push 1
push eax
call esi
push 0xfffffffffffffff4
call ebx
mov ecx, dword [edi + 0x18]
mov dword [ebp - 0x3c], eax
test ecx, ecx
je 0x494350
cmp dword [ecx + 4], 0
je 0x494350
lea ecx, [ebp + 0x10]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetHandleInformation]
test eax, eax
je 0x49433b
and dword [ebp + 0x10], 1
je 0x49433b
push 0
push 1
push dword [ebp - 0x3c]
call esi
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 4]
mov dword [ebp - 0x3c], eax
cmp eax, 0xffffffff
je 0x494350
push 1
push 1
push eax
call esi
mov eax, dword [edi + 0x30]
test eax, eax
je 0x4943ce
push eax
mov dword [ebp - 0x74], str.Winsta0Default
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x49439c
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x494379
xor esi, esi
jmp 0x494381
call esi
lea esi, [eax + 0xafc80]
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [edi + 0x30], 0
pop edi
mov eax, esi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 8]
push 1
push 0
push dword [edi + 0x34]
push dword [ebp - 0x14]
push dword [ebp - 0x18]
push dword [edi + 0x30]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov dword [ebp + 0xc], eax
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x4943f4
lea eax, [ebp - 0x38]
push eax
lea eax, [ebp - 0x7c]
push eax
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [ebp - 8]
push 1
push 0
push 0
push dword [ebp - 0x14]
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov dword [ebp + 0xc], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x494401
cmp dword [eax + 4], 0
jne 0x49441b
mov eax, dword [edi + 0x10]
test eax, eax
je 0x49440e
cmp dword [eax + 4], 0
jne 0x49441b
mov eax, dword [edi + 0x18]
test eax, eax
je 0x49444b
cmp dword [eax + 4], 0
je 0x49444b
mov eax, dword [ebp + 0x14]
test eax, eax
je 0x49442b
push eax
push eax
push 0xfffffffffffffff6
call ebx
push eax
call esi
mov eax, dword [ebp + 0x1c]
test eax, eax
je 0x49443b
push eax
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
mov eax, dword [ebp + 0x10]
test eax, eax
je 0x49444b
push eax
push eax
push 0xfffffffffffffff4
call ebx
push eax
call esi
push 0x50223c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp + 0xc], 0
jne 0x494478
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x4944cb
call esi
pop edi
pop esi
add eax, 0xafc80
pop ebx
mov esp, ebp
pop ebp
ret 0x18
mov ecx, dword [ebp + 8]
mov eax, dword [ebp - 0x38]
mov dword [ecx + 0x14], eax
mov eax, dword [ebp - 0x30]
mov dword [ecx], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x49449a
cmp eax, 0x4fc550
je 0x49449a
push eax
call fcn.0048fad0
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4944ae
cmp eax, 0x4fc550
je 0x4944ae
push eax
call fcn.0048fad0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4944c2
cmp eax, 0x4fc550
je 0x4944c2
push eax
call fcn.0048fad0
push dword [ebp - 0x34]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x18