Function at 0x4020a0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
mov dword [ebp - 4], 0
mov dword [ebp - 0x20], 0
push 0x2f
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
test eax, eax
je 0x4020d9
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
jmp 0x40231d
push str.GVPRPATH
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x402101
push str.GPRPATH
call dword [sym.imp.MSVCR90.dll_getenv]
add esp, 4
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x402173
mov edx, dword [ebp - 0x1c]
mov al, byte [edx]
mov byte [ebp - 0x11], al
movsx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x402173
movsx edx, byte [ebp - 0x11]
cmp edx, 0x3b
jne 0x40213a
lea eax, [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0x1c]
push ecx
push 0x43d31c
call fcn.00402330
add esp, 0xc
mov dword [ebp - 0x20], eax
jmp 0x402171
mov edx, dword [ebp - 0x1c]
push edx
call sub.MSVCR90.dll_strlen
add esp, 4
mov ecx, dword [ebp - 0x1c]
mov dl, byte [ecx + eax - 1]
mov byte [ebp - 0x11], dl
movsx eax, byte [ebp - 0x11]
cmp eax, 0x3b
jne 0x402171
lea ecx, [ebp - 0x1c]
push ecx
push 0x43d320
mov edx, dword [ebp - 0x1c]
push edx
call fcn.00402330
add esp, 0xc
mov dword [ebp - 0x20], eax
jmp 0x40217a
mov dword [ebp - 0x1c], 0x43d324
cmp dword [ebp + 0xc], 0
je 0x40219c
mov eax, dword [ebp - 0x1c]
push eax
push 0x43d328
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0xc
push 6
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0
push 0
call fcn.004228d0
add esp, 0x14
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x4021cd
push str.Could_not_open_buffer
push 2
call fcn.0040d0d0
add esp, 8
xor eax, eax
jmp 0x40231d
mov ecx, dword [ebp - 0x1c]
movsx edx, byte [ecx]
test edx, edx
je 0x4022bd
cmp dword [ebp - 4], 0
jne 0x4022bd
mov eax, dword [ebp - 0x1c]
movsx ecx, byte [eax]
cmp ecx, 0x3b
jne 0x4021fb
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
jmp 0x4021cd
push 0x3b
mov eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.MSVCR90.dll_strchr]
add esp, 8
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
je 0x40223b
mov ecx, dword [ebp - 8]
sub ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebp - 0x18]
push edx
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004222c0
add esp, 0xc
mov edx, dword [ebp - 8]
add edx, 1
mov dword [ebp - 0x1c], edx
jmp 0x402257
mov eax, dword [ebp - 0x1c]
push eax
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.004220d0
add esp, 8
mov dword [ebp - 0x18], eax
mov edx, dword [ebp - 0x1c]
add edx, dword [ebp - 0x18]
mov dword [ebp - 0x1c], edx
push 0x5c
mov eax, dword [ebp - 0xc]
push eax
call fcn.00401050
add esp, 8
mov ecx, dword [ebp + 8]
push ecx
mov edx, dword [ebp - 0xc]
push edx
call fcn.004220d0
add esp, 8
push 0
mov eax, dword [ebp - 0xc]
push eax
call fcn.00401050
add esp, 8
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0xc]
mov eax, dword [edx + 0x18]
mov dword [ecx], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ecx]
mov dword [ebp - 0x10], edx
push 4
mov eax, dword [ebp - 0x10]
push eax
call sub.MSVCR90.dll__access
add esp, 8
test eax, eax
jne 0x4022b8
mov ecx, dword [ebp - 0x10]
push ecx
call dword [sym.imp.MSVCR90.dll__strdup]
add esp, 4
mov dword [ebp - 4], eax
jmp 0x4021cd
cmp dword [ebp - 4], 0
jne 0x4022d6
mov edx, dword [ebp + 8]
push edx
push str.Could_not_find_file___s__in_GVPRPATH
push 2
call fcn.0040d0d0
add esp, 0xc
mov eax, dword [ebp - 0xc]
push eax
call fcn.00421290
add esp, 4
cmp dword [ebp - 0x20], 0
je 0x4022f4
mov ecx, dword [ebp - 0x20]
push ecx
call fcn.00421290
add esp, 4
cmp dword [ebp + 0xc], 0
je 0x40231a
mov edx, dword [ebp - 4]
push edx
mov eax, dword [ebp + 8]
push eax
push str.file__s_resolved_to__s_n
call dword [sym.imp.MSVCR90.dll___iob_func]
add eax, 0x40
push eax
call dword [sym.imp.MSVCR90.dll_fprintf]
add esp, 0x10
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret