Function at 0x4075e8
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x803c
call fcn.00417744
push edi
push esi
push ebx
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x4000]
push ebx
push 0x79
call fcn.00401aa8
add esp, 0xfffffff8
push ebx
push 0x4075d3
call fcn.004086f0
add esp, 0x20
mov dword [ebp - 0x4010], 0
mov dword [ebp - 0x400c], 0
mov dword [ebp - 0x4008], 0
add esp, 0xfffffff8
push 0x405693
push ebx
jmp 0x4076bc
add esp, 0xfffffff4
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
push ecx
call fcn.00417534
mov dword [ebp - 0x8024], eax
add esp, 0xfffffff8
push ebx
push eax
call sub.msvcrt.dll_strcpy
lea ecx, [ebp - 0x4010]
lea eax, [ebp - 0x8024]
add esp, 0x20
mov edx, dword [ebp - 0x400c]
cmp edx, dword [ebp - 0x4008]
je 0x4076a4
test edx, edx
je 0x407698
mov eax, dword [ebp - 0x8024]
mov dword [edx], eax
add dword [ebp - 0x400c], 4
jmp 0x4076b2
add esp, 0xfffffffc
push eax
push edx
push ecx
call fcn.0041cee8
add esp, 0x10
add esp, 0xfffffff8
push 0x405693
push 0
call sub.msvcrt.dll_strtok
mov ebx, eax
add esp, 0x10
test ebx, ebx
je 0x4076df
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
cmp ecx, 0xfffffffe
jne 0x407648
mov dword [ebp - 0x8028], 0
jmp 0x407901
mov eax, dword [ebp - 0x8028]
shl eax, 2
add eax, dword [ebp - 0x4010]
mov esi, dword [eax]
add esp, 0xfffffff8
lea eax, [esi + 2]
push eax
lea edi, [ebp - 0x6020]
push edi
call sub.msvcrt.dll_strcpy
add esp, 0xfffffff4
push edi
call fcn.00406dd8
add esp, 0x20
cmp byte [esi + 1], 0x31
sete byte [ebp - 0x8029]
mov al, byte [esi]
cmp al, 0x44
je 0x4077b0
jg 0x40773c
cmp al, 0x41
je 0x4077b0
jmp 0x4078c6
cmp al, 0x45
je 0x4077f8
cmp al, 0x53
jne 0x4078c6
add esp, 0xfffffffc
push 0
push edi
lea ebx, [ebp - 0x8020]
push ebx
call fcn.00404944
add esp, 0xfffffffc
push 0x405695
push ebx
mov eax, dword [ebp + 8]
push eax
call fcn.00407990
mov byte [ebp - 0x802a], al
add esp, 0x20
add esp, 0xfffffffc
push 0x405699
push ebx
mov edx, dword [ebp + 8]
push edx
call fcn.00407990
add esp, 0x10
cmp byte [ebp - 0x802a], 0
setne byte [ebp - 0x802a]
test al, al
setne al
movzx eax, al
or byte [ebp - 0x802a], al
jmp 0x4078c6
add esp, 0xfffffff8
push edi
lea ebx, [ebp - 0x8020]
push ebx
call fcn.0040413c
add esp, 0xfffffff4
push ebx
call fcn.00404464
mov byte [ebp - 0x802a], al
add esp, 0x20
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strcat
add esp, 0xfffffff8
push 0x405693
mov edx, dword [ebp + 8]
push edx
call sub.msvcrt.dll_strcat
add esp, 0x20
jmp 0x4078c6
add esp, 0xfffffffc
push 0x2000
lea ebx, [ebp - 0x8020]
push ebx
push edi
call sub.KERNEL32.dll_GetEnvironmentVariableA
add esp, 4
test eax, eax
je 0x4078a0
cmp byte [ebp - 0x8020], 0x22
jne 0x407858
mov edi, ebx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp byte [ebx + ecx - 2], 0x22
jne 0x407858
mov edi, ebx
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
mov byte [ebx + ecx - 2], al
add esp, 0xfffffff8
lea eax, [ebp - 0x801f]
push eax
mov edx, dword [ebp + 8]
push edx
jmp 0x407860
add esp, 0xfffffff8
push ebx
mov eax, dword [ebp + 8]
push eax
call sub.msvcrt.dll_strcat
add esp, 0x10
lea edx, [ebp - 0x8020]
mov edi, edx
mov al, 0
cld
mov ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
cmp byte [edx + ecx - 2], 0x3b
je 0x407897
add esp, 0xfffffff8
push 0x405693
mov edx, dword [ebp + 8]
push edx
call sub.msvcrt.dll_strcat
add esp, 0x10
mov byte [ebp - 0x802a], 1
jmp 0x4078c6
cmp byte [ebp - 0x8029], 0
je 0x4078ef
call sub.KERNEL32.dll_GetLastError
cmp eax, 0xcb
jne 0x4078c6
add esp, 0xfffffff8
push edi
push 0x3f0
call fcn.00403b40
cmp byte [ebp - 0x8029], 0
je 0x4078ef
cmp byte [ebp - 0x802a], 0
jne 0x4078ef
add esp, 0xfffffff8
lea eax, [ebp - 0x6020]
push eax
push 0x3ee
call fcn.00403b40
add esp, 0xfffffff4
push esi
call fcn.00417650
add esp, 0x10
inc dword [ebp - 0x8028]
mov eax, dword [ebp - 0x4010]
mov edx, dword [ebp - 0x400c]
sub edx, eax
mov eax, edx
sar eax, 2
cmp dword [ebp - 0x8028], eax
jb 0x4076f0
mov edi, dword [ebp - 0x4010]
mov eax, dword [ebp - 0x4008]
sub eax, edi
sar eax, 2
je 0x407980
shl eax, 2
cmp eax, 0x80
jbe 0x407948
add esp, 0xfffffff4
push edi
call sub.msvcrt.dll_free
jmp 0x407980
lea ebx, [eax + 7]
shr ebx, 3
lea ebx, [ebx*4 - 4]
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_EnterCriticalSection
add esp, 0xc
mov eax, dword [ebx + 0x422c0c]
mov dword [edi], eax
mov dword [ebx + 0x422c0c], edi
add esp, 0xfffffff4
push 0x430408
call sub.KERNEL32.dll_LeaveCriticalSection
lea esp, [ebp - 0x8048]
pop ebx
pop esi
pop edi
leave
ret