Function at 0x40f39a
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x21b4
call fcn.0041e950
cmp dword [ebp + 8], 0
je 0x40f3b7
mov eax, dword [ebp + 8]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x40f3be
xor eax, eax
jmp 0x40f86f
mov edx, dword [ebp + 8]
movsx eax, byte [edx]
cmp eax, 0x22
jne 0x40f3d2
mov ecx, dword [ebp + 8]
add ecx, 1
mov dword [ebp + 8], ecx
mov edx, 1
test edx, edx
je 0x40f405
push 0x22
mov eax, dword [ebp + 8]
push eax
call fcn.0041e720
add esp, 8
mov dword [ebp - 0xc54], eax
cmp dword [ebp - 0xc54], 0
jne 0x40f3fa
jmp 0x40f405
mov ecx, dword [ebp - 0xc54]
mov byte [ecx], 0x20
jmp 0x40f3d2
mov edx, dword [ebp + 0xc]
push edx
lea eax, [ebp - 0xb4c]
push eax
call fcn.0041dfb0
add esp, 8
lea ecx, [ebp - 0xb4c]
push ecx
call fcn.0042814d
add esp, 4
lea edx, [ebp - 0xa48]
push edx
lea eax, [ebp - 0xc50]
push eax
push 0
push 0
lea ecx, [ebp - 0xb4c]
push ecx
call fcn.0041ed15
add esp, 0x14
mov edx, 1
test edx, edx
je 0x40f47b
push 0x2f
mov eax, dword [ebp + 8]
push eax
call fcn.0041e720
add esp, 8
mov dword [ebp - 0xc54], eax
cmp dword [ebp - 0xc54], 0
jne 0x40f470
jmp 0x40f47b
mov ecx, dword [ebp - 0xc54]
mov byte [ecx], 0x5c
jmp 0x40f448
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0xa28]
push eax
call fcn.0041dfb0
add esp, 8
lea ecx, [ebp - 0xa28]
push ecx
call fcn.0042814d
add esp, 4
mov edx, dword [ebp + 8]
push edx
lea eax, [ebp - 0x20b0]
push eax
call fcn.0041dfb0
add esp, 8
mov ecx, 1
test ecx, ecx
je 0x40f661
push 0x25
lea edx, [ebp - 0x20b0]
push edx
call fcn.0041e720
add esp, 8
mov dword [ebp - 0xc54], eax
cmp dword [ebp - 0xc54], 0
je 0x40f65a
push 0x25
mov eax, dword [ebp - 0xc54]
add eax, 1
push eax
call fcn.0041e720
add esp, 8
mov dword [ebp - 0xc5c], eax
cmp dword [ebp - 0xc5c], 0
jne 0x40f509
jmp 0x40f661
mov ecx, dword [ebp - 0xc5c]
mov byte [ecx], 0
push 0x104
lea edx, [ebp - 0x21b4]
push edx
mov eax, dword [ebp - 0xc54]
add eax, 1
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
mov dword [ebp - 0xb50], eax
cmp dword [ebp - 0xb50], 0
jne 0x40f54b
mov ecx, dword [ebp - 0xc5c]
mov byte [ecx], 0x25
jmp 0x40f661
cmp dword [ebp - 0xb50], 0x104
ja 0x40f564
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x40f572
mov edx, dword [ebp - 0xc5c]
mov byte [edx], 0x25
jmp 0x40f661
mov eax, dword [ebp - 0xc54]
mov byte [eax], 0
mov byte [ebp - 0x1688], 0
lea ecx, [ebp - 0x20b0]
push ecx
lea edx, [ebp - 0x1688]
push edx
call fcn.0041dfb0
add esp, 8
movsx eax, byte [ebp - 0x21b4]
cmp eax, 0x5c
je 0x40f5d4
lea ecx, [ebp - 0x1688]
push ecx
call fcn.0041df30
add esp, 4
movsx edx, byte [ebp + eax - 0x1688]
cmp edx, 0x5c
je 0x40f5d4
push 0x42e0e8
lea eax, [ebp - 0x1688]
push eax
call fcn.0041dfc0
add esp, 8
lea ecx, [ebp - 0x21b4]
push ecx
lea edx, [ebp - 0x1688]
push edx
call fcn.0041dfc0
add esp, 8
mov eax, dword [ebp - 0xc5c]
movsx ecx, byte [eax + 1]
cmp ecx, 0x5c
je 0x40f629
lea edx, [ebp - 0x1688]
push edx
call fcn.0041df30
add esp, 4
movsx eax, byte [ebp + eax - 0x1688]
cmp eax, 0x5c
je 0x40f629
push 0x42e0ec
lea ecx, [ebp - 0x1688]
push ecx
call fcn.0041dfc0
add esp, 8
mov edx, dword [ebp - 0xc5c]
add edx, 1
push edx
lea eax, [ebp - 0x1688]
push eax
call fcn.0041dfc0
add esp, 8
lea ecx, [ebp - 0x1688]
push ecx
lea edx, [ebp - 0x20b0]
push edx
call fcn.0041dfb0
add esp, 8
jmp 0x40f65c
jmp 0x40f661
jmp 0x40f4b0
lea eax, [ebp - 0x20b0]
push eax
lea ecx, [ebp - 0xa28]
push ecx
call fcn.0041dfb0
add esp, 8
lea edx, [ebp - 0xa28]
push edx
call fcn.0042814d
add esp, 4
push 0x2e
lea eax, [ebp - 0xb4c]
push eax
call fcn.0041e870
add esp, 8
mov dword [ebp - 0xc54], eax
cmp dword [ebp - 0xc54], 0
jne 0x40f6ad
xor eax, eax
jmp 0x40f86f
mov ecx, dword [ebp - 0xc54]
mov byte [ecx], 0
lea edx, [ebp - 0xb4c]
push edx
call fcn.0041df30
add esp, 4
mov dword [ebp - 0xc58], eax
mov eax, dword [ebp - 0xc58]
push eax
lea ecx, [ebp - 0xb4c]
push ecx
lea edx, [ebp - 0xa28]
push edx
call fcn.00420370
add esp, 0xc
test eax, eax
jne 0x40f790
mov eax, dword [ebp - 0xc54]
mov byte [eax], 0x2e
mov ecx, dword [ebp - 0xc54]
push ecx
call fcn.0041df30
add esp, 4
push eax
mov edx, dword [ebp - 0xc54]
push edx
mov eax, dword [ebp - 0xc58]
lea ecx, [ebp + eax - 0xa28]
push ecx
call fcn.00420370
add esp, 0xc
test eax, eax
jne 0x40f734
mov eax, 1
jmp 0x40f86f
mov edx, dword [ebp - 0xc58]
movsx eax, byte [ebp + edx - 0xa28]
test eax, eax
je 0x40f77f
mov ecx, dword [ebp - 0xc58]
movsx edx, byte [ebp + ecx - 0xa28]
cmp edx, 0x20
je 0x40f77f
mov eax, dword [ebp - 0xc58]
movsx ecx, byte [ebp + eax - 0xa28]
cmp ecx, 0x5c
je 0x40f77f
mov edx, dword [ebp - 0xc58]
movsx eax, byte [ebp + edx - 0xa28]
cmp eax, 0x2d
jne 0x40f789
mov eax, 1
jmp 0x40f86f
xor eax, eax
jmp 0x40f86f
mov ecx, dword [ebp - 0xc54]
mov byte [ecx], 0x2e
lea edx, [ebp - 0xc50]
push edx
call fcn.0041df30
add esp, 4
mov dword [ebp - 0xc58], eax
lea eax, [ebp - 0xa48]
push eax
call fcn.0041df30
add esp, 4
mov dword [ebp - 0xc60], eax
mov ecx, dword [ebp - 0xc58]
push ecx
lea edx, [ebp - 0xc50]
push edx
lea eax, [ebp - 0xa28]
push eax
call fcn.00420370
add esp, 0xc
test eax, eax
jne 0x40f86d
mov ecx, dword [ebp - 0xc60]
push ecx
lea edx, [ebp - 0xa48]
push edx
mov eax, dword [ebp - 0xc58]
lea ecx, [ebp + eax - 0xa28]
push ecx
call fcn.00420370
add esp, 0xc
test eax, eax
jne 0x40f817
mov eax, 1
jmp 0x40f86f
mov edx, dword [ebp - 0xc58]
movsx eax, byte [ebp + edx - 0xa28]
test eax, eax
je 0x40f862
mov ecx, dword [ebp - 0xc58]
movsx edx, byte [ebp + ecx - 0xa28]
cmp edx, 0x20
je 0x40f862
mov eax, dword [ebp - 0xc58]
movsx ecx, byte [ebp + eax - 0xa28]
cmp ecx, 0x5c
je 0x40f862
mov edx, dword [ebp - 0xc58]
movsx eax, byte [ebp + edx - 0xa28]
cmp eax, 0x2d
jne 0x40f869
mov eax, 1
jmp 0x40f86f
xor eax, eax
jmp 0x40f86f
xor eax, eax
mov esp, ebp
pop ebp
ret