Function at 0x405f50
Capabilities:
Query environment variable

Disassembly:
sub esp, 0x210
mov eax, dword [0x4b2a8c]
xor eax, esp
mov dword [esp + 0x20c], eax
cmp dword [esp + 0x218], 0
mov eax, dword [esp + 0x214]
push esi
push edi
je 0x405f8c
mov edx, 0x2616010
sub edx, eax
mov edi, edi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x405f80
jmp 0x405fde
cmp byte [eax], 0
mov esi, eax
mov edi, 0x2616010
je 0x405fdb
push ebx
lea esp, [esp]
mov bl, byte [esi]
mov eax, 0x4bb02b
mov cl, byte [eax - 1]
mov dl, byte [eax]
test cl, cl
jne 0x405fb4
test dl, dl
je 0x405fcc
cmp cl, bl
ja 0x405fbc
cmp bl, dl
jbe 0x405fc1
add eax, 2
jmp 0x405fa7
mov byte [edi], bl
mov al, byte [esi + 1]
inc edi
inc esi
mov byte [edi], al
jmp 0x405fd3
cmp bl, 0x20
je 0x405fd4
mov byte [edi], bl
inc edi
inc esi
cmp byte [esi], 0
jne 0x405fa0
pop ebx
mov byte [edi], 0
push 0x4a7568
push 0x2616010
call fcn.00482e4e
add esp, 8
test eax, eax
jne 0x406016
jmp 0x406000
mov cl, byte [eax + str.C:COMMAND.COM]
mov byte [eax + 0x2616010], cl
inc eax
test cl, cl
jne 0x406000
jmp 0x4061e0
xor edi, edi
cmp dword [0x4b806c], edi
je 0x4061e0
push edi
push 0x2616010
call fcn.0048402f
add esp, 8
test eax, eax
je 0x4061e0
cmp dword [esp + 0x224], edi
jne 0x4061e0
lea ecx, [esp + 8]
push ecx
lea edx, [esp + 0x10]
push edx
push 0x104
push 0x2616010
mov dword [esp + 0x18], edi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
test eax, eax
je 0x4061e0
mov eax, dword [esp + 8]
cmp eax, edi
je 0x4061e0
push 0x4a7578
push eax
call fcn.00483ce0
add esp, 8
test eax, eax
jne 0x4061e0
mov eax, dword [esp + 8]
push 0x4a757c
push eax
call fcn.00483ce0
add esp, 8
test eax, eax
jne 0x4061e0
mov esi, dword [esp + 8]
lea edx, [esp + 0x110]
mov eax, esi
sub edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x4060b8
mov byte [esi], cl
movzx eax, byte [0x4b9869]
movsx ecx, byte [esp + 0xc]
lea edx, [eax + 0x40]
cmp ecx, edx
je 0x4060e2
add eax, 0x60
cmp ecx, eax
jne 0x4061e0
cmp byte [esp + 0xd], 0x3a
jne 0x4061e0
mov al, byte [esp + 0xe]
cmp al, 0x5c
je 0x4060fd
cmp al, 0x2f
jne 0x4061e0
cmp byte [esp + 0xf], 0
jne 0x4061e0
cmp dword [0x4b60ec], 0xffffffff
jne 0x406188
push edx
lea ecx, [esp + 0x10]
push str._c:MS_DOS_Player.___
push ecx
call fcn.00483265
lea edx, [esp + 0x18]
push 0x4a5f6c
push edx
mov dword [0x4b60ec], 1
call fcn.00485737
mov esi, eax
add esp, 0x14
cmp esi, edi
je 0x406169
push str.TEST
push esi
call fcn.00485ba5
add esp, 8
cmp eax, 4
jne 0x40615c
mov dword [0x4b60ec], edi
cmp esi, edi
je 0x406169
push esi
call fcn.004895ad
add esp, 4
lea eax, [esp + 0xc]
push edi
push eax
call fcn.0048402f
add esp, 8
test eax, eax
jne 0x406188
lea ecx, [esp + 0xc]
push ecx
call fcn.00484af3
add esp, 4
cmp dword [0x4b60ec], 1
jne 0x4061e0
mov esi, dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
push 0x104
lea edx, [esp + 0x10]
push edx
push 0x4a75a0
call esi
test eax, eax
jne 0x4061c1
push 0x104
lea eax, [esp + 0x10]
push eax
push 0x4a75a8
call esi
test eax, eax
je 0x4061e0
lea edi, [esp + 0x110]
lea eax, [esp + 0xc]
call fcn.00405ed0
mov edx, 0x2616010
mov cl, byte [eax]
mov byte [edx], cl
inc eax
inc edx
test cl, cl
jne 0x4061d6
mov ecx, dword [esp + 0x214]
pop edi
pop esi
xor ecx, esp
mov eax, 0x2616010
call fcn.00482caa
add esp, 0x210
ret