Function at 0x4e5000
Capabilities:
Create process on windows
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x90
mov edx, dword [esp + 0x94]
xor ecx, ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0xb4]
mov dword [esp + 0x18], 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
cmp dword [edi + 0x24], ecx
je 0x4e5048
cmp dword [0x560ea8], 0x1e
mov eax, 8
cmovge ecx, eax
mov dword [esp + 0x18], ecx
mov ebp, dword [esp + 0xa8]
mov ebx, dword [esp + 0xb8]
cmp byte [ebp], 0x22
jne 0x4e5081
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5061
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [ebp + 1]
push eax
push ebx
call fcn.004de650
mov ebp, eax
mov dword [esp + 0xa8], ebp
mov ecx, dword [edi + 0x20]
cmp ecx, 1
je 0x4e50b3
cmp ecx, 2
je 0x4e50b3
push ebx
push 0x10
push ebp
push 0x536db7
lea eax, [esp + 0x3c]
mov dword [esp + 0x3c], 0
push eax
call fcn.004df880
test eax, eax
jne 0x4e5118
mov ebp, dword [esp + 0x2c]
jmp 0x4e5111
push ebx
push 0x10
push ebp
push dword [edi + 0x1c]
lea eax, [esp + 0x40]
mov dword [esp + 0x40], 0
push eax
call fcn.004df880
mov esi, eax
test esi, esi
je 0x4e510d
cmp dword [edi + 0x28], 0
je 0x4e50fe
push 0
push ebp
push str._progname:
push dword [edi + 0x1c]
push str._currdir:
push str.filepath_merge_failed.
push ebx
call fcn.004de550
push eax
mov eax, dword [edi + 0x28]
push esi
push ebx
call eax
add esp, 0x28
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18
mov ebp, dword [esp + 0x30]
mov dword [esp + 0xa8], ebp
mov al, byte [ebp]
mov esi, ebp
test al, al
je 0x4e5139
movzx eax, al
push eax
call fcn.004c3560
add esp, 4
test eax, eax
jne 0x4e51a2
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4e5121
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0xac]
mov ebp, 0x536db7
test eax, eax
je 0x4e51f1
lea ebx, [eax + 4]
mov esi, dword [ebx]
test esi, esi
je 0x4e51ea
mov al, byte [esi]
test al, al
je 0x4e517e
movzx eax, al
push eax
call fcn.004c3560
add esp, 4
test eax, eax
jne 0x4e51c1
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4e5164
mov esi, dword [ebx]
cmp byte [esi], 0
je 0x4e51c3
push 0
push esi
push 0x522528
push ebp
push dword [esp + 0xc8]
call fcn.004de550
add esp, 0x14
mov ebp, eax
add ebx, 4
jmp 0x4e5154
push 0
push 0x52e87c
push ebp
push 0x52e87c
push ebx
call fcn.004de550
add esp, 0x14
mov dword [esp + 0x10], eax
jmp 0x4e513d
mov esi, dword [ebx]
push 0
push 0x52e87c
push esi
push 0x52e880
push ebp
push dword [esp + 0xcc]
call fcn.004de550
add esp, 0x18
mov ebp, eax
add ebx, 4
jmp 0x4e5154
mov ebx, dword [esp + 0xb8]
mov eax, dword [edi + 0x20]
test eax, eax
je 0x4e53fd
cmp eax, 4
je 0x4e53fd
mov esi, dword [esp + 0xa8]
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5211
sub ecx, edx
cmp ecx, 4
jb 0x4e53cf
add esi, 0xfffffffc
add esi, ecx
push str..bat
push esi
call fcn.004cd160
add esp, 8
test eax, eax
je 0x4e5250
push str..cmd
push esi
call fcn.004cd160
add esp, 8
test eax, eax
jne 0x4e53cf
push str.COMSPEC
call fcn.004d9654
mov esi, eax
add esp, 4
test esi, esi
jne 0x4e528b
mov eax, dword [edi + 0x28]
test eax, eax
je 0x4e542a
push str.COMSPEC_envar_is_not_set
push 0x16
push ebx
call eax
add esp, 0xc
lea eax, [esi + 0x16]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18
cmp byte [esi], 0x22
jne 0x4e52b5
mov ecx, esi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5295
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [esi + 1]
push eax
push ebx
call fcn.004de650
mov dword [esp + 0xa8], eax
jmp 0x4e52e8
push esi
mov dword [esp + 0xac], esi
call fcn.004e5e30
add esp, 4
test eax, eax
je 0x4e52e1
push 0
push 0x52e87c
push esi
push 0x52e87c
push ebx
call fcn.004de550
add esp, 0x14
mov esi, eax
mov eax, dword [esp + 0xa8]
mov ecx, eax
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e52f0
sub ecx, edx
cmp ecx, 0xb
jb 0x4e5336
mov eax, dword [esp + 0xa8]
add eax, 0xfffffff5
add eax, ecx
push str.command.com
push eax
call fcn.004cd160
add esp, 8
test eax, eax
jne 0x4e5336
push eax
push ebp
push dword [esp + 0x18]
push str.__C
push esi
push ebx
call fcn.004de550
add esp, 0x18
jmp 0x4e5534
mov ecx, ebp
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5340
sub ecx, edx
lea eax, [ecx*2 + 1]
push eax
push ebx
call fcn.004dde90
mov dl, byte [ebp]
mov ecx, eax
mov dword [esp + 0x14], eax
test dl, dl
je 0x4e5395
cmp dl, 0xd
je 0x4e5385
cmp dl, 0xa
je 0x4e5385
movzx eax, dl
test byte [eax + 0x52e700], 2
je 0x4e5381
mov byte [ecx], 0x5e
inc ecx
mov dl, byte [ebp]
mov byte [ecx], dl
jmp 0x4e5388
mov byte [ecx], 0x20
mov dl, byte [ebp + 1]
inc ebp
inc ecx
test dl, dl
jne 0x4e5364
mov eax, dword [esp + 0x14]
mov byte [ecx], 0
mov ecx, dword [esp + 0x10]
push 0
push 0x52e87c
push eax
cmp byte [ecx], 0x22
je 0x4e53c3
push 0x52e87c
push ecx
push str.__C___
push esi
push ebx
call fcn.004de550
add esp, 0x20
jmp 0x4e5534
push ecx
push str.__C__
push esi
jmp 0x4e552b
push 0
push ebp
push dword [esp + 0x18]
push ebx
call fcn.004de550
add esp, 0x10
mov dword [esp + 0x10], eax
cmp dword [edi + 0x20], 3
jne 0x4e5538
mov dword [esp + 0xa8], 0
jmp 0x4e5538
push str.COMSPEC
call fcn.004d9654
mov ebx, eax
add esp, 4
test ebx, ebx
jne 0x4e543c
mov eax, dword [edi + 0x28]
test eax, eax
je 0x4e542a
push str.COMSPEC_envar_is_not_set
push 0x16
push dword [esp + 0xc0]
call eax
add esp, 0xc
pop edi
pop esi
pop ebp
mov eax, 0x16
pop ebx
add esp, 0x90
ret 0x18
mov al, byte [ebx]
cmp al, 0x22
jne 0x4e546d
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5447
sub ecx, edx
lea eax, [ecx - 2]
push eax
lea eax, [ebx + 1]
push eax
push dword [esp + 0xc0]
call fcn.004de650
mov dword [esp + 0xa8], eax
jmp 0x4e54c3
mov dword [esp + 0xa8], ebx
mov esi, ebx
test al, al
je 0x4e54bc
nop word [eax + eax]
movzx eax, al
push eax
call fcn.004c3560
add esp, 4
test eax, eax
jne 0x4e549a
mov al, byte [esi + 1]
inc esi
test al, al
jne 0x4e5480
jmp 0x4e54bc
test esi, esi
je 0x4e54bc
push 0
push 0x52e87c
push ebx
push 0x52e87c
push dword [esp + 0xc8]
call fcn.004de550
add esp, 0x14
mov ebx, eax
mov eax, dword [esp + 0xa8]
mov ecx, eax
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e54c8
sub ecx, edx
cmp ecx, 0xb
jb 0x4e5512
mov eax, dword [esp + 0xa8]
add eax, 0xfffffff5
add eax, ecx
push str.command.com
push eax
call fcn.004cd160
add esp, 8
test eax, eax
jne 0x4e5512
push eax
push ebp
push dword [esp + 0x18]
push str.__C
push ebx
mov ebx, dword [esp + 0xcc]
push ebx
call fcn.004de550
add esp, 0x18
jmp 0x4e5534
push 0
push 0x52e87c
push ebp
push dword [esp + 0x1c]
push str.__C__
push ebx
mov ebx, dword [esp + 0xd0]
push ebx
call fcn.004de550
add esp, 0x1c
mov dword [esp + 0x10], eax
mov ecx, dword [esp + 0xb0]
test ecx, ecx
je 0x4e567a
mov eax, dword [edi + 0x20]
cmp eax, 2
je 0x4e567a
cmp eax, 4
je 0x4e567a
mov ecx, dword [ecx]
mov edx, 1
xor esi, esi
mov dword [esp + 0x34], edx
mov eax, edx
test ecx, ecx
je 0x4e55a1
mov edi, dword [esp + 0xb0]
lea ebp, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5580
sub ecx, ebp
inc esi
inc ecx
add edx, ecx
mov eax, edx
mov dword [esp + 0x34], edx
mov ecx, dword [edi + esi*4]
test ecx, ecx
jne 0x4e5576
mov edi, dword [esp + 0xb4]
test esi, esi
jne 0x4e55aa
inc eax
mov dword [esp + 0x34], eax
add eax, eax
push eax
push ebx
call fcn.004dde90
or dword [esp + 0x18], 0x400
mov esi, eax
mov dword [esp + 0x3c], eax
xor ebp, ebp
mov eax, dword [esp + 0xb0]
mov edx, dword [eax]
test edx, edx
je 0x4e562b
mov ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x14], eax
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e55e0
sub ecx, dword [esp + 0x14]
lea eax, [ecx + 1]
mov dword [esp + 0x1c], eax
lea eax, [esp + 0x34]
push eax
push esi
lea eax, [esp + 0x24]
push eax
push edx
call fcn.004e8590
mov dword [esp + 0x14], eax
test eax, eax
jne 0x4e563a
push eax
push esi
call fcn.004b6abf
inc ebp
add esp, 8
lea esi, [eax + 2]
mov eax, dword [esp + 0xb0]
mov edx, dword [eax + ebp*4]
test edx, edx
jne 0x4e55d0
test ebp, ebp
jne 0x4e5633
xor eax, eax
mov word [esi], ax
add esi, 2
xor eax, eax
mov word [esi], ax
jmp 0x4e5682
cmp dword [edi + 0x28], 0
je 0x4e5b3d
mov eax, dword [esp + 0xb0]
push 0
push dword [eax + ebp*4]
push str.utf8_to_ucs2_conversion_failed_on_this_string:
push ebx
call fcn.004de550
push eax
push dword [esp + 0x28]
mov eax, dword [edi + 0x28]
push ebx
call eax
mov eax, dword [esp + 0x30]
add esp, 0x1c
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18
mov dword [esp + 0x3c], 0
mov ecx, dword [esp + 0xa4]
mov ebp, dword [esp + 0xa8]
mov eax, dword [esp + 0x10]
mov dword [esp + 0x20], 0
mov dword [ecx + 0x10], eax
mov dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x38], 0
test ebp, ebp
je 0x4e5739
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e56d0
sub ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x44], eax
add eax, 6
mov dword [esp + 0x40], eax
add eax, eax
push eax
push ebx
call fcn.004dde90
lea ecx, [esp + 0x40]
mov dword [esp + 0x14], eax
push ecx
push eax
lea eax, [esp + 0x4c]
push eax
push ebp
call fcn.004e8590
mov esi, eax
test esi, esi
je 0x4e5739
cmp dword [edi + 0x28], 0
je 0x4e572a
push 0
push ebp
push str.utf8_to_ucs2_conversion_failed_on_progname:
push ebx
call fcn.004de550
push eax
mov eax, dword [edi + 0x28]
push esi
push ebx
call eax
add esp, 0x1c
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18
mov ebp, dword [esp + 0x10]
test ebp, ebp
je 0x4e578e
mov ecx, ebp
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5746
sub ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x2c], eax
mov dword [esp + 0x30], eax
add eax, eax
push eax
push ebx
call fcn.004dde90
lea ecx, [esp + 0x30]
mov dword [esp + 0x1c], eax
push ecx
push eax
lea eax, [esp + 0x34]
push eax
push ebp
call fcn.004e8590
mov esi, eax
test esi, esi
je 0x4e578e
cmp dword [edi + 0x28], 0
je 0x4e572a
push 0
push ebp
push str.utf8_to_ucs2_conversion_failed_on_cmdline:
jmp 0x4e5719
mov ecx, dword [edi + 0x1c]
test ecx, ecx
je 0x4e57eb
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4e5798
sub ecx, edx
lea eax, [ecx + 1]
mov dword [esp + 0x48], eax
mov dword [esp + 0x10], eax
add eax, eax
push eax
push ebx
call fcn.004dde90
lea ecx, [esp + 0x10]
mov dword [esp + 0x38], eax
push ecx
push eax
lea eax, [esp + 0x50]
push eax
push dword [edi + 0x1c]
call fcn.004e8590
mov esi, eax
test esi, esi
je 0x4e57eb
cmp dword [edi + 0x28], 0
je 0x4e572a
push 0
push dword [edi + 0x1c]
push str.utf8_to_ucs2_conversion_failed_on_currdir:
jmp 0x4e5719
cmp dword [edi + 0x24], 0
xorps xmm0, xmm0
movlpd qword [esp + 0x50], xmm0
movlpd qword [esp + 0x58], xmm0
movlpd qword [esp + 0x60], xmm0
movlpd qword [esp + 0x68], xmm0
movlpd qword [esp + 0x70], xmm0
movlpd qword [esp + 0x78], xmm0
movlpd qword [esp + 0x80], xmm0
movlpd qword [esp + 0x88], xmm0
mov dword [esp + 0x4c], 0x44
je 0x4e583e
or dword [esp + 0x78], 1
xor eax, eax
mov word [esp + 0x7c], ax
push 0x560e6c
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 0x4e5862
cmp dword [eax + 4], 0
jne 0x4e5884
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4e586f
cmp dword [eax + 4], 0
jne 0x4e5884
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4e5985
cmp dword [eax + 4], 0
je 0x4e5985
or dword [esp + 0x78], 0x100
push 0xfffffffffffffff6
call ebx
mov ecx, dword [edi + 8]
mov ebp, dword [sym.imp.KERNEL32.dll_GetHandleInformation]
mov dword [esp + 0x84], eax
test ecx, ecx
je 0x4e58e3
cmp dword [ecx + 4], 0
je 0x4e58e3
lea ecx, [esp + 0x20]
push ecx
push eax
call ebp
test eax, eax
je 0x4e58ca
and dword [esp + 0x20], 1
je 0x4e58ca
push 0
push 1
push dword [esp + 0x8c]
call esi
mov eax, dword [edi + 8]
mov eax, dword [eax + 4]
mov dword [esp + 0x84], eax
cmp eax, 0xffffffff
je 0x4e58e3
push 1
push 1
push eax
call esi
push 0xfffffffffffffff5
call ebx
mov ecx, dword [edi + 0x10]
mov dword [esp + 0x88], eax
test ecx, ecx
je 0x4e5934
cmp dword [ecx + 4], 0
je 0x4e5934
lea ecx, [esp + 0x24]
push ecx
push eax
call ebp
test eax, eax
je 0x4e591b
and dword [esp + 0x24], 1
je 0x4e591b
push 0
push 1
push dword [esp + 0x90]
call esi
mov eax, dword [edi + 0x10]
mov eax, dword [eax + 4]
mov dword [esp + 0x88], eax
cmp eax, 0xffffffff
je 0x4e5934
push 1
push 1
push eax
call esi
push 0xfffffffffffffff4
call ebx
mov ecx, dword [edi + 0x18]
mov dword [esp + 0x8c], eax
test ecx, ecx
je 0x4e5985
cmp dword [ecx + 4], 0
je 0x4e5985
lea ecx, [esp + 0x28]
push ecx
push eax
call ebp
test eax, eax
je 0x4e596c
and dword [esp + 0x28], 1
je 0x4e596c
push 0
push 1
push dword [esp + 0x94]
call esi
mov eax, dword [edi + 0x18]
mov eax, dword [eax + 4]
mov dword [esp + 0x8c], eax
cmp eax, 0xffffffff
je 0x4e5985
push 1
push 1
push eax
call esi
mov eax, dword [edi + 0x30]
test eax, eax
je 0x4e5a20
push eax
mov dword [esp + 0x58], str.Winsta0Default
call dword [sym.imp.ADVAPI32.dll_ImpersonateLoggedOnUser]
test eax, eax
jne 0x4e59e5
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
jne 0x4e59b3
xor esi, esi
jmp 0x4e59bb
call esi
lea esi, [eax + 0xafc80]
push dword [edi + 0x30]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x560e6c
mov dword [edi + 0x30], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x40]
push dword [esp + 0x48]
push dword [esp + 0x28]
push 1
push 0
push dword [edi + 0x34]
push dword [esp + 0x3c]
push dword [esp + 0x38]
push dword [edi + 0x30]
call dword [sym.imp.ADVAPI32.dll_CreateProcessAsUserW]
mov ebp, eax
call dword [sym.imp.ADVAPI32.dll_RevertToSelf]
jmp 0x4e5a4f
lea eax, [esp + 0x90]
push eax
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x40]
push dword [esp + 0x48]
push dword [esp + 0x28]
push 1
push 0
push 0
push dword [esp + 0x3c]
push dword [esp + 0x38]
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
mov ebp, eax
mov eax, dword [edi + 8]
test eax, eax
je 0x4e5a5c
cmp dword [eax + 4], 0
jne 0x4e5a76
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4e5a69
cmp dword [eax + 4], 0
jne 0x4e5a76
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4e5aa9
cmp dword [eax + 4], 0
je 0x4e5aa9
mov eax, dword [esp + 0x20]
test eax, eax
je 0x4e5a87
push eax
push eax
push 0xfffffffffffffff6
call ebx
push eax
call esi
mov eax, dword [esp + 0x24]
test eax, eax
je 0x4e5a98
push eax
push eax
push 0xfffffffffffffff5
call ebx
push eax
call esi
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4e5aa9
push eax
push eax
push 0xfffffffffffffff4
call ebx
push eax
call esi
push 0x560e6c
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
test ebp, ebp
jne 0x4e5ad8
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
test eax, eax
je 0x4e5b3b
call esi
pop edi
pop esi
pop ebp
add eax, 0xafc80
pop ebx
add esp, 0x90
ret 0x18
mov ecx, dword [esp + 0xa4]
mov eax, dword [esp + 0x90]
mov dword [ecx + 0x14], eax
mov eax, dword [esp + 0x98]
mov dword [ecx], eax
mov eax, dword [edi + 8]
test eax, eax
je 0x4e5b06
cmp eax, 0x557c70
je 0x4e5b06
push eax
call fcn.004e09c0
mov eax, dword [edi + 0x10]
test eax, eax
je 0x4e5b1a
cmp eax, 0x557c70
je 0x4e5b1a
push eax
call fcn.004e09c0
mov eax, dword [edi + 0x18]
test eax, eax
je 0x4e5b2e
cmp eax, 0x557c70
je 0x4e5b2e
push eax
call fcn.004e09c0
push dword [esp + 0x94]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x90
ret 0x18