Function at 0x478240
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 0x478789
mov eax, dword [edi]
test eax, eax
je 0x478789
xor esi, esi
lea esi, [esi]
add esi, 1
mov eax, dword [edi + esi*4]
lea ebx, [esi*4]
test eax, eax
jne 0x478270
lea eax, [ebx + 0x1e]
shr eax, 4
shl eax, 4
call fcn.00484160
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], 0x4781c0
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 0x4782e0
mov dword [esp], edi
mov ebx, dword [ebp - 0x24]
call fcn.00479130
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.004798e0
cmp ebx, edi
lea edx, [eax + 1]
jne 0x478310
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 0x4787a5
mov ebx, 0x5acbfe
xor esi, esi
lea eax, [esi + edi + 6]
mov dword [esp], eax
call fcn.00479130
mov esi, eax
mov dword [ebp - 0x28], eax
movzx eax, byte [ebx]
cmp al, 0x3b
je 0x47879c
test al, al
mov edi, ebx
jne 0x478384
jmp 0x47879c
test al, al
je 0x47838e
add edi, 1
movzx eax, byte [edi]
cmp al, 0x3b
jne 0x478380
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 0x4783b6
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 0x4783ea
jmp 0x4783fb
add ebx, 1
movzx eax, byte [ebx]
test al, al
je 0x4783fb
cmp al, 0x2f
jne 0x4783e0
mov byte [ebx], 0x5c
add ebx, 1
movzx eax, byte [ebx]
test al, al
jne 0x4783ea
mov ecx, 0x5acc34
mov dword [ebp - 0x1c], edi
mov eax, str..com
mov edi, ecx
jmp 0x47841d
add edi, 4
mov eax, dword [edi]
test eax, eax
je 0x478750
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 0x478410
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 0x478537
movzx edx, byte [ecx]
xor eax, eax
mov dword [ebp - 0x1c], 0
test dl, dl
jne 0x4784c0
jmp 0x478780
movzx edx, byte [ecx + eax + 1]
lea ebx, [eax + 1]
mov esi, ebx
test dl, dl
je 0x478512
mov eax, ebx
mov ebx, edx
and ebx, 0xfffffffd
cmp bl, 0x20
je 0x478610
cmp dl, 9
je 0x478610
cmp dl, 0x22
jne 0x4784b0
lea edx, [eax - 1]
cmp edx, 0xffffffff
je 0x478501
cmp byte [ecx + eax - 1], 0x5c
je 0x4784f6
jmp 0x478501
cmp byte [ecx + edx], 0x5c
jne 0x478501
sub edx, 1
add edi, 1
cmp edx, 0xffffffff
jne 0x4784f0
movzx edx, byte [ecx + eax + 1]
lea ebx, [eax + 1]
add edi, 1
mov esi, ebx
test dl, dl
jne 0x4784be
mov ebx, dword [ebp - 0x1c]
xor edx, edx
test ebx, ebx
jne 0x47862b
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 0x478492
mov dword [esp], edi
call fcn.00479130
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 0x47867e
mov esi, esi
lea edi, [edi]
movzx ecx, byte [edx]
test cl, cl
je 0x478795
mov eax, ecx
and eax, 0xfffffffd
cmp al, 0x20
je 0x478640
cmp cl, 9
je 0x478640
lea ebx, [edx + 1]
mov edi, ecx
jmp 0x4785a9
mov ecx, eax
add ebx, 1
and ecx, 0xfffffffd
cmp cl, 0x20
je 0x478640
cmp al, 9
je 0x478640
movzx eax, byte [ebx]
test al, al
jne 0x478590
mov ecx, edi
mov eax, esi
xor edi, edi
mov ebx, 0xffffffff
jmp 0x4785dd
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 0x478710
cmp cl, 0x22
mov esi, eax
jne 0x4785c0
cmp ebx, 0xffffffff
mov ecx, ebx
je 0x478608
cmp byte [edx + ebx], 0x5c
je 0x4785f9
jmp 0x478608
cmp byte [edx + ecx], 0x5c
jne 0x478608
sub ecx, 1
add eax, 1
mov byte [eax - 1], 0x5c
cmp ecx, 0xffffffff
jne 0x4785f3
lea esi, [eax + 1]
mov byte [eax], 0x5c
jmp 0x4785c0
mov dword [ebp - 0x1c], 1
jmp 0x4784d7
sub eax, 1
add edi, 1
cmp eax, 0xffffffff
je 0x478631
cmp byte [ecx + eax], 0x5c
je 0x478620
mov edx, 2
jmp 0x47851f
mov byte [esi], 0x22
movzx ecx, byte [edx]
lea eax, [esi + 1]
mov edi, 1
test cl, cl
jne 0x4785b6
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 0x478560
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 0x47882c
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 0x478666
lea ecx, [esi - 1]
cmp ecx, 0xffffffff
je 0x478660
cmp byte [edx + esi - 1], 0x5c
je 0x47873c
jmp 0x478660
cmp byte [edx + ecx], 0x5c
jne 0x478660
sub ecx, 1
add eax, 1
mov byte [eax - 1], 0x5c
cmp ecx, 0xffffffff
jne 0x478732
jmp 0x478660
mov edi, dword [ebp - 0x1c]
movzx eax, byte [edi]
mov ebx, edi
test al, al
jne 0x47836c
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 0x478706
xor edx, edx
xor esi, esi
jmp 0x47851f
mov dword [ebp - 0x24], 0
jmp 0x47832c
mov ecx, esi
jmp 0x478666
mov eax, esi
mov edi, ebx
jmp 0x4783b6
mov dword [esp + 4], 0x5c
mov dword [esp], esi
call sub.msvcrt.dll_strchr
test eax, eax
jne 0x478351
mov esi, dword [ebp - 0x28]
test esi, esi
je 0x478351
mov dword [esp], str.PATH
call sub.msvcrt.dll_getenv
test eax, eax
mov ebx, eax
je 0x478351
mov ecx, eax
xor esi, esi
movzx edx, byte [ecx]
test dl, dl
je 0x478358
cmp dl, 0x3b
mov eax, ecx
jne 0x478804
jmp 0x478825
test dl, dl
je 0x47880f
add eax, 1
movzx edx, byte [eax]
cmp dl, 0x3b
jne 0x478800
mov byte [ebp - 0x1c], dl
mov edx, eax
sub edx, ecx
cmp esi, edx
cmovb esi, edx
cmp byte [ebp - 0x1c], 0x3b
je 0x478825
mov ecx, eax
jmp 0x4787e2
add eax, 1
mov ecx, eax
jmp 0x4787e2
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 0x478706