Function at 0xf01d043
Capabilities:
Set console window title
Set current directory
Set environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x588
mov eax, dword [0xf0ad034]
push esi
push edi
xor edi, edi
cmp dword [0xf0bd814], edi
mov dword [ebp - 4], eax
mov dword [ebp - 0x4e8], 0x3a3f3d
mov byte [ebp - 0x148], 0
mov esi, 0x104
jne 0xf01d0d2
cmp dword [0xf0bd81c], edi
jne 0xf01d098
push esi
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleTitleA]
test eax, eax
jne 0xf01d098
mov byte [ebp - 0x148], al
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
push eax
lea eax, [ebp - 0x44]
push 0xf0025a0
push eax
call fcn.0f015bd0
add esp, 0x14
lea eax, [ebp - 0x44]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
jmp 0xf01d0fb
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x10]
push dword [eax + 0x10]
lea eax, [ebp - 0x148]
push dword [0xf0bd820]
push 0xf00257c
push eax
call fcn.0f015bd0
add esp, 0x10
mov ecx, dword [sym.ntvdm.exe_fSeparateWow]
cmp ecx, edi
lea eax, [ebp - 0x4e0]
mov dword [ebp - 0x564], eax
mov eax, dword [0xf0bd814]
mov word [ebp - 0x4f4], si
mov dword [ebp - 0x558], edi
mov dword [ebp - 0x55c], edi
je 0xf01d134
mov word [ebp - 0x4f0], 0x900
jmp 0xf01d149
xor edx, edx
cmp eax, edi
sete dl
lea edx, [edx + edx + 0x102]
mov word [ebp - 0x4f0], dx
cmp eax, edi
mov dword [ebp - 0x56c], edi
mov word [ebp - 0x4f8], di
mov dword [ebp - 0x568], edi
mov word [ebp - 0x4f6], di
je 0xf01d171
cmp ecx, edi
mov ecx, dword [0xf0bd820]
je 0xf01d177
mov ecx, dword [0xf0bd81c]
mov dword [ebp - 0x588], ecx
mov ecx, eax
neg ecx
sbb ecx, ecx
and ecx, 0xffffff7f
add ecx, 0x81
neg eax
sbb eax, eax
mov dword [ebp - 0x4fc], ecx
not eax
lea ecx, [ebp - 0x1cc]
and eax, ecx
cmp byte [ebp - 0x148], 0
mov dword [ebp - 0x500], eax
lea eax, [ebp - 0x2d4]
mov dword [ebp - 0x510], edi
mov dword [ebp - 0x50c], edi
mov word [ebp - 0x4f2], 0x105
mov dword [ebp - 0x560], eax
jne 0xf01d1e7
lea eax, [ebp - 0x148]
mov dword [ebp - 0x508], eax
mov dword [ebp - 0x504], esi
jmp 0xf01d1f3
mov dword [ebp - 0x508], edi
mov dword [ebp - 0x504], edi
push ebx
lea eax, [ebp - 0x588]
push eax
mov byte [ebp - 0x4e0], 0
mov byte [0xf22a709], 0
mov byte [0xf22a70a], 0
mov byte [0xf22a70b], 0
call sub.KERNEL32.dll_GetNextVDMCommand
test eax, eax
je 0xf01d2da
cmp dword [0xf0bd814], edi
mov eax, dword [ebp - 0x4fc]
mov byte [ebp + eax - 0x1cc], 0
jne 0xf01d2a4
cmp eax, edi
je 0xf01d2a4
lea eax, [ebp - 0x1cc]
push 0xf002574
push eax
call fcn.0f09b030
mov esi, eax
cmp esi, edi
pop ecx
pop ecx
je 0xf01d2a4
add esi, 6
cmp byte [esi], 0x30
mov eax, esi
jl 0xf01d2a4
cmp byte [esi], 0x39
jg 0xf01d26c
inc esi
cmp byte [esi], 0x30
jge 0xf01d261
cmp eax, esi
je 0xf01d2a4
mov bl, byte [esi]
push 0xa
push edi
push eax
mov byte [esi], 0
call fcn.0f09a8d0
add esp, 0xc
test al, 1
mov byte [esi], bl
je 0xf01d28e
mov byte [0xf22a70a], 1
test al, 2
je 0xf01d299
mov byte [0xf22a70b], 1
test al, 4
je 0xf01d2a4
mov byte [0xf22a709], 1
cmp word [ebp - 0x4f2], di
je 0xf01d2da
mov al, byte [ebp - 0x2d4]
mov byte [ebp - 0x4e7], al
lea eax, [ebp - 0x2d4]
push eax
lea eax, [ebp - 0x4e8]
push eax
call dword [sym.imp.KERNEL32.dll_SetEnvironmentVariableA]
lea eax, [ebp - 0x2d4]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
cmp byte [ebp - 0x4e0], 0
mov byte [0xf22a70c], 0
setne al
cmp dword [0xf0bd814], edi
mov byte [0xf22a70d], 0
mov byte [0xf22a708], al
je 0xf01d321
mov dword [0xf0bd81c], edi
mov byte [0xf22a70a], 1
mov byte [0xf22a709], 1
mov byte [0xf22a70c], 1
mov byte [0xf22a70b], 1
lea eax, [ebp - 0x4e0]
push eax
call fcn.0f014233
call fcn.0f0117c4
cmp dword [0xf0bd814], edi
mov ebx, 0x4000
je 0xf01d356
mov dword [0xf22a6d8], edi
mov dword [0xf205ff0], 0x3c00
mov esi, ebx
jmp 0xf01d3e3
mov ax, word [0xf0be4dc]
cmp ax, 0xffff
mov esi, 0x1000
je 0xf01d36a
movzx esi, ax
mov ax, word [0xf0be4d8]
cmp ax, 0xffff
mov ecx, 0x3c00
mov dword [0xf22a6d8], esi
mov edx, ecx
je 0xf01d386
movzx edx, ax
mov eax, 0x8000
cmp esi, eax
mov dword [0xf205ff0], edx
jbe 0xf01d39a
mov dword [0xf22a6d8], eax
mov eax, 0x400
cmp edx, eax
jae 0xf01d3aa
mov dword [0xf205ff0], eax
jmp 0xf01d3b4
cmp edx, ecx
jbe 0xf01d3b4
mov dword [0xf205ff0], ecx
mov ax, word [0xf0be4e0]
cmp ax, di
jne 0xf01d3e0
push 0xf00256c
call fcn.0f01dc27
cmp eax, edi
pop ecx
je 0xf01d34f
push eax
call fcn.0f09af10
mov esi, eax
cmp esi, edi
pop ecx
jne 0xf01d3e3
jmp 0xf01d34f
movzx esi, ax
cmp dword [0xf0bd814], edi
jne 0xf01d40f
push edi
push 9
call fcn.0f0135ac
test eax, eax
je 0xf01d40f
push 0xf0b031c
call fcn.0f03bb6b
test eax, eax
je 0xf01d40f
mov dword [0xf0b031c], 1
mov eax, dword [0xf205ff0]
add esi, eax
mov eax, dword [0xf22a6d8]
lea eax, [esi + eax + 0x400]
mov ecx, ebx
cmp eax, ebx
pop ebx
jbe 0xf01d42b
mov ecx, eax
shl ecx, 0xa
push ecx
call fcn.0f0116cb
call fcn.0f03b946
cmp dword [0xf0bd814], edi
jne 0xf01d47d
push 6
pop esi
lea eax, [ebp - 0x44]
push eax
push 0xf002558
call dword [sym.imp.USER32.dll_FindWindowA]
cmp eax, edi
mov dword [0xf229d7c], eax
jne 0xf01d47d
cmp esi, edi
je 0xf01d470
push 0xa
call dword [sym.imp.KERNEL32.dll_Sleep]
cmp dword [0xf229d7c], edi
jne 0xf01d47d
mov eax, esi
dec esi
test eax, eax
jne 0xf01d444
mov dword [0xf229d7c], edi
cmp byte [ebp - 0x148], 0
je 0xf01d493
lea eax, [ebp - 0x148]
push eax
call dword [sym.imp.KERNEL32.dll_SetConsoleTitleA]
call fcn.0f016961
push 2
mov word [0xf0b0338], 1
mov byte [0xf0be4e8], 0
mov byte [ebp - 0x4e4], 0x33
pop esi
push edi
push 1
push dword [ebp - 0x4e4]
call fcn.0f0111b4
test ax, ax
jne 0xf01d4cb
inc byte [0xf0be4e8]
inc byte [ebp - 0x4e4]
dec esi
jne 0xf01d4b2
mov ecx, dword [ebp - 4]
pop edi
pop esi
call fcn.0f01dda0
leave
ret