Function at 0x408216
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x2ee4]
mov eax, 0x2ee4
call fcn.0040f5e0
push 0xffffffffffffffff
push 0x42796c
mov eax, dword fs:[0]
push eax
sub esp, 0x28
mov eax, dword [0x431920]
xor eax, ebp
mov dword [ebp + 0x2ee0], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, dword [ebp + 0x2ef0]
mov esi, 0x1770
push esi
mov dword [ebp - 0x18], ebx
call fcn.0040ef5c
mov edi, eax
push esi
push edi
push dword [ebp + 0x2eec]
mov dword [ebp - 0x1c], edi
call fcn.004037d1
push edi
push str.entry__S
call fcn.0040c1e2
add esp, 0x18
lea ecx, [ebp - 0x34]
call fcn.004077d9
and dword [ebp - 4], 0
mov esi, 0x428cf4
push esi
push edi
jmp 0x4082d0
push edi
call fcn.0040f0b0
pop ecx
test eax, eax
je 0x4082dd
push edi
call fcn.0040f0b0
inc eax
push eax
call fcn.0040ef5c
push edi
push eax
mov dword [ebp - 0x14], eax
call fcn.0040f4d0
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x34]
call fcn.0040786e
push esi
push 0
call fcn.0040fee0
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x40829c
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x28]
sar eax, 2
push eax
push 0x42a5fc
call fcn.0040c1e2
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x28]
and dword [ebp - 0x14], 0
sar eax, 2
pop ecx
pop ecx
test eax, eax
jbe 0x4084e8
push dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
call fcn.00406e3d
mov edi, dword [eax]
lea eax, [edi + 2]
push eax
lea eax, [ebp]
push eax
call fcn.0040f4d0
lea eax, [ebp]
push eax
call fcn.00406bd5
movsx eax, byte [edi]
add esp, 0xc
cmp byte [edi + 1], 0x31
sete byte [ebp - 0xe]
sub eax, 0x41
je 0x408476
sub eax, 3
je 0x408476
dec eax
je 0x4083b2
sub eax, 0xe
jne 0x4084b0
push eax
lea eax, [ebp]
push eax
lea eax, [ebp + 0x1770]
push eax
call fcn.00405558
add esp, 0xc
cmp dword [ebp + 0x2eec], 0x79
lea eax, [ebp + 0x1770]
jne 0x4083a6
push 0x42a5f8
push eax
push ebx
call fcn.00407580
mov byte [ebp - 0xd], al
push 0x42a5f4
lea eax, [ebp + 0x1770]
push eax
push ebx
call fcn.00407580
add esp, 0x18
or byte [ebp - 0xd], al
jmp 0x4084b0
push eax
call fcn.00404995
pop ecx
jmp 0x408497
push 0x1770
lea eax, [ebp + 0x1770]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x408451
cmp byte [ebp + 0x1770], 0x22
jne 0x40841b
lea eax, [ebp + 0x1770]
lea ebx, [ebp + 0x1770]
push eax
dec ebx
call fcn.0040f0b0
cmp byte [eax + ebx], 0x22
pop ecx
jne 0x408418
lea eax, [ebp + 0x1770]
push eax
call fcn.0040f0b0
pop ecx
mov ecx, dword [ebp - 0x18]
mov byte [eax + ebx], 0
lea eax, [ebp + 0x1771]
push eax
call fcn.00405a3b
mov ebx, dword [ebp - 0x18]
jmp 0x408429
mov ebx, dword [ebp - 0x18]
lea eax, [ebp + 0x1770]
push eax
mov ecx, ebx
call fcn.00405a3b
lea eax, [ebp + 0x1770]
push eax
call fcn.0040f0b0
pop ecx
lea ecx, [ebp + 0x1770]
dec ecx
cmp byte [eax + ecx], 0x3b
je 0x40844b
push esi
mov ecx, ebx
call fcn.00405a3b
mov byte [ebp - 0xd], 1
jmp 0x4084b0
cmp byte [ebp - 0xe], 0
je 0x4084cc
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x4084b0
lea eax, [ebp]
push eax
push 0x3f0
call fcn.00403fc3
pop ecx
pop ecx
jmp 0x4084b0
push 0
lea eax, [ebp]
push eax
lea eax, [ebp + 0x1770]
push eax
call fcn.00405765
lea eax, [ebp + 0x1770]
push eax
call fcn.00404995
add esp, 0x10
mov byte [ebp - 0xd], al
lea eax, [ebp + 0x1770]
push eax
mov ecx, ebx
call fcn.00405a3b
push esi
mov ecx, ebx
call fcn.00405a3b
cmp byte [ebp - 0xe], 0
je 0x4084cc
cmp byte [ebp - 0xd], 0
jne 0x4084cc
lea eax, [ebp]
push eax
push 0x3ee
call fcn.00403fc3
pop ecx
pop ecx
push edi
call fcn.0040f388
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x28]
inc dword [ebp - 0x14]
sar eax, 2
pop ecx
cmp dword [ebp - 0x14], eax
jb 0x408308
push dword [ebp - 0x1c]
call fcn.0040f388
pop ecx
lea ecx, [ebp - 0x34]
call fcn.00409a46
push dword [ebp - 0x34]
call fcn.0040f388
pop ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x2ee0]
xor ecx, ebp
call fcn.0040f5c8
add ebp, 0x2ee4
leave
ret