Function at 0x46d440
Capabilities:
Create process on windows
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x5c
mov edi, dword [ebp + 8]
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x2c], ecx
test edi, edi
je 0x46d97c
mov eax, dword [edi]
test eax, eax
je 0x46d97c
xor esi, esi
lea esi, [esi]
add esi, 1
mov eax, dword [edi + esi*4]
lea ebx, [esi*4]
test eax, eax
jne 0x46d470
lea eax, [ebx + 0x1e]
shr eax, 4
shl eax, 4
call fcn.0047a070
sub esp, eax
lea eax, [esp + 0x37]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
and eax, 0xfffffff0
mov dword [esp], eax
mov dword [ebp - 0x1c], eax
call sub.msvcrt.dll_memcpy
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], esi
mov esi, edi
mov dword [esp + 0xc], 0x46d3c0
mov dword [esp + 8], 4
mov dword [esp], eax
call sub.msvcrt.dll_qsort
lea eax, [edi + ebx]
mov dword [ebp - 0x24], ebx
mov edi, 1
mov ebx, eax
lea esi, [esi]
mov eax, dword [esi]
add esi, 4
mov dword [esp], eax
call sub.msvcrt.dll_strlen
cmp ebx, esi
lea edi, [edi + eax + 1]
jne 0x46d4e0
mov dword [esp], edi
mov ebx, dword [ebp - 0x24]
call fcn.0046ea40
mov edi, dword [ebp - 0x1c]
mov dword [ebp - 0x24], eax
mov edx, eax
add ebx, edi
lea esi, [esi]
mov eax, dword [edi]
mov dword [esp], edx
add edi, 4
mov dword [esp + 4], eax
call fcn.0046f210
cmp ebx, edi
lea edx, [eax + 1]
jne 0x46d510
mov byte [eax + 1], 0
mov esi, dword [ebp - 0x20]
mov dword [esp], esi
call sub.msvcrt.dll_strlen
mov dword [esp + 4], 0x2f
mov dword [esp], esi
mov edi, eax
call sub.msvcrt.dll_strchr
test eax, eax
je 0x46d991
mov ebx, 0x4d729e
xor esi, esi
lea eax, [esi + edi + 6]
mov dword [esp], eax
call fcn.0046ea40
mov esi, eax
mov dword [ebp - 0x28], eax
movzx eax, byte [ebx]
cmp al, 0x3b
je 0x46d988
test al, al
mov edi, ebx
jne 0x46d584
jmp 0x46d988
test al, al
je 0x46d58e
add edi, 1
movzx eax, byte [edi]
cmp al, 0x3b
jne 0x46d580
mov ecx, edi
mov dword [esp + 4], ebx
mov dword [esp], esi
sub ecx, ebx
mov dword [esp + 8], ecx
mov dword [ebp - 0x1c], ecx
call sub.msvcrt.dll_memcpy
mov ecx, dword [ebp - 0x1c]
add ecx, esi
cmp edi, ebx
mov eax, ecx
je 0x46d5b6
add eax, 1
mov byte [ecx], 0x5c
mov ebx, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 4], ebx
mov ebx, esi
call sub.msvcrt.dll_strcpy
xor eax, eax
cmp byte [edi], 0x3b
sete al
add edi, eax
movzx eax, byte [esi]
test al, al
jne 0x46d5ea
jmp 0x46d5fb
add ebx, 1
movzx eax, byte [ebx]
test al, al
je 0x46d5fb
cmp al, 0x2f
jne 0x46d5e0
mov byte [ebx], 0x5c
add ebx, 1
movzx eax, byte [ebx]
test al, al
jne 0x46d5ea
mov ecx, 0x4d72d4
mov dword [ebp - 0x1c], edi
mov eax, str..com
mov edi, ecx
jmp 0x46d61d
add edi, 4
mov eax, dword [edi]
test eax, eax
je 0x46d940
mov byte [ebx], 0
mov dword [esp + 4], eax
mov dword [esp], esi
call sub.msvcrt.dll_strcat
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], esi
call dword [sym.imp.KERNEL32.dll_CreateFileA]
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x46d610
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
xor edi, edi
mov dword [ebp - 0x30], eax
call eax
mov eax, dword [ebp - 0x2c]
sub esp, 4
mov ecx, dword [eax]
add eax, 4
mov dword [ebp - 0x20], eax
test ecx, ecx
je 0x46d737
movzx edx, byte [ecx]
xor eax, eax
mov dword [ebp - 0x1c], 0
test dl, dl
jne 0x46d6c0
jmp 0x46d970
movzx edx, byte [ecx + eax + 1]
lea ebx, [eax + 1]
mov esi, ebx
test dl, dl
je 0x46d712
mov eax, ebx
mov ebx, edx
and ebx, 0xfffffffd
cmp bl, 0x20
je 0x46d802
cmp dl, 9
je 0x46d802
cmp dl, 0x22
jne 0x46d6b0
lea edx, [eax - 1]
cmp edx, 0xffffffff
je 0x46d701
cmp byte [ecx + eax - 1], 0x5c
je 0x46d6f6
jmp 0x46d701
cmp byte [ecx + edx], 0x5c
jne 0x46d701
sub edx, 1
add edi, 1
cmp edx, 0xffffffff
jne 0x46d6f0
movzx edx, byte [ecx + eax + 1]
lea ebx, [eax + 1]
add edi, 1
mov esi, ebx
test dl, dl
jne 0x46d6be
mov ebx, dword [ebp - 0x1c]
xor edx, edx
test ebx, ebx
jne 0x46d81b
add dword [ebp - 0x20], 4
lea edi, [esi + edi + 1]
mov eax, dword [ebp - 0x20]
add edi, edx
mov ecx, dword [eax - 4]
test ecx, ecx
jne 0x46d692
mov dword [esp], edi
call fcn.0046ea40
mov edi, dword [ebp - 0x2c]
mov dword [ebp - 0x20], eax
mov edx, dword [edi]
lea esi, [edi + 4]
mov dword [ebp - 0x1c], esi
mov esi, eax
test edx, edx
je 0x46d86e
mov esi, esi
lea edi, [edi]
movzx ecx, byte [edx]
test cl, 0xdf
je 0x46d830
cmp cl, 9
je 0x46d830
cmp cl, 0x22
je 0x46d830
xor ebx, ebx
mov edi, ecx
jmp 0x46d79a
mov ecx, eax
and ecx, 0xfffffffd
cmp cl, 0x20
je 0x46d830
cmp al, 9
je 0x46d830
add ebx, 1
movzx eax, byte [edx + ebx]
test al, al
jne 0x46d784
mov ecx, edi
mov eax, esi
xor edi, edi
mov ebx, 0xffffffff
jmp 0x46d7cf
movzx ecx, byte [edx + ebx + 1]
lea eax, [esi + 1]
mov byte [esi], cl
lea esi, [ebx + 2]
add ebx, 1
movzx ecx, byte [edx + ebx + 1]
test cl, cl
je 0x46d900
cmp cl, 0x22
mov esi, eax
jne 0x46d7b2
cmp ebx, 0xffffffff
mov ecx, ebx
je 0x46d7fa
cmp byte [edx + ebx], 0x5c
je 0x46d7eb
jmp 0x46d7fa
cmp byte [edx + ecx], 0x5c
jne 0x46d7fa
sub ecx, 1
add eax, 1
mov byte [eax - 1], 0x5c
cmp ecx, 0xffffffff
jne 0x46d7e5
lea esi, [eax + 1]
mov byte [eax], 0x5c
jmp 0x46d7b2
mov dword [ebp - 0x1c], 1
jmp 0x46d6d7
sub eax, 1
add edi, 1
cmp eax, 0xffffffff
je 0x46d821
cmp byte [ecx + eax], 0x5c
je 0x46d810
mov edx, 2
jmp 0x46d71f
mov byte [esi], 0x22
movzx ecx, byte [edx]
lea eax, [esi + 1]
mov edi, 1
test cl, cl
jne 0x46d7ab
lea esi, [esi]
lea edi, [edi]
lea ecx, [eax + 1]
mov byte [eax], 0x22
add dword [ebp - 0x1c], 4
lea esi, [ecx + 1]
mov byte [ecx], 0x20
mov eax, dword [ebp - 0x1c]
mov edx, dword [eax - 4]
test edx, edx
jne 0x46d760
mov eax, dword [ebp + 0x14]
mov byte [esi - 1], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x10], 1
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 0x24], eax
mov eax, dword [ebp + 0x10]
mov dword [esp + 0x20], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0x18], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call dword [sym.imp.KERNEL32.dll_CreateProcessA]
sub esp, 0x28
test eax, eax
je 0x46da17
mov eax, dword [ebp + 0x14]
mov eax, dword [eax + 4]
mov dword [esp], eax
call dword [ebp - 0x30]
mov eax, dword [ebp - 0x28]
sub esp, 4
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
test edi, edi
mov ecx, eax
je 0x46d856
lea ecx, [esi - 1]
cmp ecx, 0xffffffff
je 0x46d850
cmp byte [edx + esi - 1], 0x5c
je 0x46d92c
jmp 0x46d850
cmp byte [edx + ecx], 0x5c
jne 0x46d850
sub ecx, 1
add eax, 1
mov byte [eax - 1], 0x5c
cmp ecx, 0xffffffff
jne 0x46d922
jmp 0x46d850
mov edi, dword [ebp - 0x1c]
movzx eax, byte [edi]
mov ebx, edi
test al, al
jne 0x46d56c
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, 0xffffffff
jmp 0x46d8f6
mov edx, 2
xor esi, esi
jmp 0x46d71f
mov dword [ebp - 0x24], 0
jmp 0x46d52c
mov eax, esi
mov edi, ebx
jmp 0x46d5b6
mov dword [esp + 4], 0x5c
mov dword [esp], esi
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x46d551
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x46d551
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x46d551
mov ecx, eax
xor esi, esi
nop
movzx edx, byte [ecx]
test dl, dl
je 0x46d558
cmp dl, 0x3b
mov eax, ecx
jne 0x46d9e8
jmp 0x46da10
test dl, dl
je 0x46d9f3
add eax, 1
movzx edx, byte [eax]
cmp dl, 0x3b
jne 0x46d9e4
mov byte [ebp - 0x1c], dl
mov edx, eax
sub edx, ecx
cmp esi, edx
cmovb esi, edx
cmp byte [ebp - 0x1c], 0x3b
je 0x46da10
mov ecx, eax
jmp 0x46d9d0
add eax, 1
mov ecx, eax
jmp 0x46d9d0
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, 0xffffffff
jmp 0x46d8f6