Function at 0x403925
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
push esi
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
movsx edx, byte [0x4065b0]
cmp ecx, edx
je 0x40395a
mov eax, dword [ebp + 8]
push eax
call fcn.0040460a
add esp, 4
cmp eax, 2
jbe 0x403991
mov ecx, dword [ebp + 8]
movsx edx, byte [ecx + 1]
cmp edx, 0x3a
jne 0x403991
mov eax, dword [ebp + 8]
push eax
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
add ecx, 0x14
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040461c
add esp, 8
jmp 0x403cc9
movsx ecx, byte [0x4065b0]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x403a3e
mov eax, dword [ebp + 8]
push eax
call fcn.0040460a
add esp, 4
add eax, 0x7e4
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0x2c]
push ecx
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x38], eax
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.MSVCRT.dll__getcwd]
add esp, 8
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040460a
add esp, 4
mov edx, dword [ebp - 0x38]
movsx eax, byte [edx + eax - 1]
movsx ecx, byte [0x4065b0]
cmp eax, ecx
je 0x403a29
mov edx, dword [ebp - 0x38]
push edx
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x2c]
mov cl, byte [0x4065b0]
mov byte [eax], cl
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x2c]
mov byte [edx + 1], 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.00404616
add esp, 8
jmp 0x403cc9
push str.PATH
call dword [sym.imp.MSVCRT.dll_getenv]
add esp, 4
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
push edx
call fcn.0040460a
add esp, 4
add eax, 0x7d2
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x30], eax
push 0x7d0
mov eax, dword [ebp - 0x30]
push eax
call dword [sym.imp.MSVCRT.dll__getcwd]
add esp, 8
mov ecx, dword [ebp - 0x30]
push ecx
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x30]
add edx, dword [ebp - 0x2c]
mov al, byte [0x4065b1]
mov byte [edx], al
mov ecx, dword [ebp - 4]
push ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x30]
lea ecx, [eax + edx + 1]
push ecx
call fcn.0040461c
add esp, 8
mov edx, dword [ebp - 0x30]
mov dword [ebp - 4], edx
cmp dword [ebp - 4], 0
jne 0x403ac5
xor eax, eax
jmp 0x403da6
mov eax, dword [ebp - 4]
push eax
call fcn.0040460a
add esp, 4
mov esi, eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.0040460a
add esp, 4
lea edx, [esi + eax + 0x7d0]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
call dword [sym.imp.MSVCRT.dll_malloc]
add esp, 4
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 4]
mov dword [ebp - 0x34], ecx
cmp dword [ebp - 0x34], 0
je 0x403cc9
mov edx, dword [ebp - 0x34]
movsx eax, byte [edx]
test eax, eax
je 0x403cc9
movsx ecx, byte [0x4065b1]
push ecx
mov edx, dword [ebp - 0x34]
push edx
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x403b47
mov eax, dword [ebp - 0x34]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040461c
add esp, 8
jmp 0x403b77
mov edx, dword [ebp - 0x30]
sub edx, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [ebp - 0x34]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.MSVCRT.dll_strncpy]
add esp, 0xc
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x2c]
mov byte [eax], 0
mov ecx, dword [ebp - 0x30]
add ecx, 1
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
push 0x22
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.MSVCRT.dll_strchr]
add esp, 8
test eax, eax
je 0x403bf1
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x40]
cmp edx, dword [ebp - 0x2c]
jge 0x403be8
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x40]
movsx ecx, byte [eax]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x40]
add edx, 1
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x3c], 0x22
jne 0x403bd2
jmp 0x403bad
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x44]
mov cl, byte [ebp - 0x3c]
mov byte [eax], cl
mov edx, dword [ebp - 0x44]
add edx, 1
mov dword [ebp - 0x44], edx
jmp 0x403bad
mov eax, dword [ebp - 0x38]
add eax, dword [ebp - 0x44]
mov byte [eax], 0
mov ecx, dword [ebp - 0x38]
movsx edx, byte [ecx]
cmp edx, 0x2e
jne 0x403c42
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040460a
add esp, 4
cmp eax, 1
je 0x403c30
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040460a
add esp, 4
cmp eax, 2
jne 0x403c42
mov edx, dword [ebp - 0x38]
movsx eax, byte [edx + 1]
movsx ecx, byte [0x4065b0]
cmp eax, ecx
jne 0x403c42
push 0x7d0
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.MSVCRT.dll__getcwd]
add esp, 8
mov eax, dword [ebp - 0x38]
push eax
call fcn.0040460a
add esp, 4
mov ecx, dword [ebp - 0x38]
movsx edx, byte [ecx + eax - 1]
movsx eax, byte [0x4065b0]
cmp edx, eax
je 0x403c87
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp - 0x38]
add edx, dword [ebp - 0x2c]
mov al, byte [0x4065b0]
mov byte [edx], al
mov ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x2c]
mov byte [ecx + 1], 0
mov edx, dword [ebp + 8]
push edx
mov eax, dword [ebp - 0x38]
push eax
call fcn.00404616
add esp, 8
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x403cc4
mov eax, dword [ebp - 0x22]
and eax, 0xffff
and eax, 0x8000
test eax, eax
je 0x403cc4
mov dword [ebp - 0x34], 0
jmp 0x403aff
lea ecx, [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x38]
push edx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x403cef
mov eax, dword [ebp - 0x22]
and eax, 0xffff
and eax, 0x8000
test eax, eax
jne 0x403d32
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.0040460a
add esp, 4
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 4
jle 0x403d32
push 0x406588
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x38]
lea ecx, [eax + edx - 4]
push ecx
call dword [sym.imp.MSVCRT.dll__stricmp]
add esp, 8
test eax, eax
je 0x403d32
push str..exe
mov edx, dword [ebp - 0x38]
push edx
call fcn.00404616
add esp, 8
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp - 0x38]
push ecx
call dword [sym.imp.MSVCRT.dll__stat]
add esp, 8
test eax, eax
jne 0x403d5a
mov edx, dword [ebp - 0x22]
and edx, 0xffff
and edx, 0x8000
test edx, edx
jne 0x403d73
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov dword [ebp - 0x38], 0
mov eax, dword [ebp - 0x38]
jmp 0x403da6
cmp dword [ebp + 0xc], 0
je 0x403da3
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.004044eb
add esp, 4
mov dword [ebp - 0x30], eax
mov edx, dword [ebp - 0x30]
cmp edx, dword [ebp - 0x38]
je 0x403da3
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.MSVCRT.dll_free]
add esp, 4
mov ecx, dword [ebp - 0x30]
mov dword [ebp - 0x38], ecx
mov eax, dword [ebp - 0x38]
pop esi
mov esp, ebp
pop ebp
ret