Function at 0x407d5d
Capabilities:
Query environment variable

Disassembly:
push ebp
lea ebp, [esp - 0x2ee4]
mov eax, 0x2ee4
call fcn.0040ede0
push 0xffffffffffffffff
push 0x42725c
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.0040e75d
mov edi, eax
push esi
push edi
push dword [ebp + 0x2eec]
mov dword [ebp - 0x1c], edi
call fcn.004037d0
push edi
push str.entry__S
call fcn.0040be55
add esp, 0x18
lea ecx, [ebp - 0x34]
call fcn.004073e3
and dword [ebp - 4], 0
mov esi, 0x428cc4
push esi
push edi
jmp 0x407e17
push edi
call fcn.0040e8b0
pop ecx
test eax, eax
je 0x407e24
push edi
call fcn.0040e8b0
inc eax
push eax
call fcn.0040e75d
push edi
push eax
mov dword [ebp - 0x14], eax
call fcn.0040ecd0
add esp, 0x10
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebp - 0x34]
call fcn.00406033
push esi
push 0
call fcn.0040f6e0
mov edi, eax
pop ecx
pop ecx
test edi, edi
jne 0x407de3
mov eax, dword [ebp - 0x24]
sub eax, dword [ebp - 0x28]
sar eax, 2
push eax
push 0x42a24c
call fcn.0040be55
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 0x40802f
push dword [ebp - 0x14]
lea ecx, [ebp - 0x34]
call fcn.004092c6
mov edi, dword [eax]
lea eax, [edi + 2]
push eax
lea eax, [ebp]
push eax
call fcn.0040ecd0
lea eax, [ebp]
push eax
call fcn.00406979
movsx eax, byte [edi]
add esp, 0xc
cmp byte [edi + 1], 0x31
sete byte [ebp - 0xe]
sub eax, 0x41
je 0x407fbd
sub eax, 3
je 0x407fbd
dec eax
je 0x407ef9
sub eax, 0xe
jne 0x407ff7
push eax
lea eax, [ebp]
push eax
lea eax, [ebp + 0x1770]
push eax
call fcn.004052c7
add esp, 0xc
cmp dword [ebp + 0x2eec], 0x79
lea eax, [ebp + 0x1770]
jne 0x407eed
push 0x42a248
push eax
push ebx
call fcn.0040730e
mov byte [ebp - 0xd], al
push 0x42a244
lea eax, [ebp + 0x1770]
push eax
push ebx
call fcn.0040730e
add esp, 0x18
or byte [ebp - 0xd], al
jmp 0x407ff7
push eax
call fcn.004046f0
pop ecx
jmp 0x407fde
push 0x1770
lea eax, [ebp + 0x1770]
push eax
lea eax, [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableA]
test eax, eax
je 0x407f98
cmp byte [ebp + 0x1770], 0x22
jne 0x407f62
lea eax, [ebp + 0x1770]
lea ebx, [ebp + 0x1770]
push eax
dec ebx
call fcn.0040e8b0
cmp byte [eax + ebx], 0x22
pop ecx
jne 0x407f5f
lea eax, [ebp + 0x1770]
push eax
call fcn.0040e8b0
pop ecx
mov ecx, dword [ebp - 0x18]
mov byte [eax + ebx], 0
lea eax, [ebp + 0x1771]
push eax
call fcn.00405784
mov ebx, dword [ebp - 0x18]
jmp 0x407f70
mov ebx, dword [ebp - 0x18]
lea eax, [ebp + 0x1770]
push eax
mov ecx, ebx
call fcn.00405784
lea eax, [ebp + 0x1770]
push eax
call fcn.0040e8b0
pop ecx
lea ecx, [ebp + 0x1770]
dec ecx
cmp byte [eax + ecx], 0x3b
je 0x407f92
push esi
mov ecx, ebx
call fcn.00405784
mov byte [ebp - 0xd], 1
jmp 0x407ff7
cmp byte [ebp - 0xe], 0
je 0x408013
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xcb
jne 0x407ff7
lea eax, [ebp]
push eax
push 0x3f0
call fcn.00403f79
pop ecx
pop ecx
jmp 0x407ff7
push 0
lea eax, [ebp]
push eax
lea eax, [ebp + 0x1770]
push eax
call fcn.004054ae
lea eax, [ebp + 0x1770]
push eax
call fcn.004046f0
add esp, 0x10
mov byte [ebp - 0xd], al
lea eax, [ebp + 0x1770]
push eax
mov ecx, ebx
call fcn.00405784
push esi
mov ecx, ebx
call fcn.00405784
cmp byte [ebp - 0xe], 0
je 0x408013
cmp byte [ebp - 0xd], 0
jne 0x408013
lea eax, [ebp]
push eax
push 0x3ee
call fcn.00403f79
pop ecx
pop ecx
push edi
call fcn.0040eb88
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 0x407e4f
push dword [ebp - 0x1c]
call fcn.0040eb88
pop ecx
lea ecx, [ebp - 0x34]
call fcn.00406ed9
push dword [ebp - 0x34]
call fcn.0040eb88
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.0040edc8
add ebp, 0x2ee4
leave
ret