Function at 0x68717730
Capabilities:
Query environment variable

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x48
mov eax, dword [ecx]
mov edx, dword [0x687190b0]
mov dword [ebp - 0x28], eax
cmp edx, 0xffffffff
je 0x68717810
mov edi, edx
sub edi, 1
js 0x687177bc
mov eax, dword [0x687313e8]
xor ebx, ebx
mov edx, edi
mov edi, ebx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x24], eax
lea esi, cs:[esi]
nop
lea eax, [edx + edi]
mov dword [ebp - 0x1c], edx
mov esi, eax
shr esi, 0x1f
add esi, eax
mov eax, dword [ebp - 0x20]
sar esi, 1
mov ebx, esi
shl ebx, 4
add ebx, eax
lea eax, [ebx + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcmp]
mov edx, dword [ebp - 0x1c]
test eax, eax
je 0x68717800
js 0x687177e0
lea edi, [esi + 1]
cmp edi, edx
jle 0x68717780
mov ecx, dword [ebp - 0x28]
movzx eax, byte [0x687190b4]
cmp byte [ecx], 0
js 0x687177f0
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
lea edx, [esi - 1]
cmp edx, edi
jge 0x68717780
jmp 0x687177bc
mov byte [ecx], al
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx eax, byte [ebx]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], str.WINEDEBUG
call dword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x687190b0], 0
test eax, eax
je 0x687177bc
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__strdup]
test eax, eax
je 0x68717914
mov dword [ebp - 0x38], eax
mov ebx, eax
lea esi, [esi]
mov dword [esp + 4], 0x2c
xor esi, esi
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
je 0x68717865
mov byte [eax], 0
lea esi, [eax + 1]
mov dword [esp + 4], 0x6873038a
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcspn]
lea edx, [ebx + eax]
movzx ecx, byte [edx]
test cl, cl
je 0x687178b0
cmp ebx, edx
jae 0x68717920
cmp eax, 5
je 0x68717aa0
cmp eax, 3
jne 0x68717ad0
cmp word [ebx], 0x7265
je 0x68717b25
lea esi, [esi]
test esi, esi
je 0x68717908
mov ebx, esi
jmp 0x68717848
movzx eax, byte [ebx]
cmp al, 0x2d
je 0x68717a70
lea edx, [eax - 0x2b]
mov ecx, edx
and ecx, 0xfd
mov byte [ebp - 0x1c], cl
je 0x68717a90
mov byte [ebp - 0x24], 0xff
mov byte [ebp - 0x1c], 0
test al, al
je 0x687178a8
mov dword [esp + 4], 0x6873039d
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcmp]
test eax, eax
jne 0x68717950
movzx eax, byte [ebp - 0x1c]
not eax
and al, byte [0x687190b4]
or al, byte [ebp - 0x24]
mov byte [0x687190b4], al
test esi, esi
jne 0x687178ac
mov edi, dword [ebp - 0x38]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [0x687190b0]
jmp 0x68717758
cmp cl, 0x2d
je 0x68717ac4
sub ecx, 0x2b
mov eax, ecx
and eax, 0xfd
mov byte [ebp - 0x1c], al
je 0x68717b1c
mov byte [ebp - 0x24], 0xff
mov ebx, edx
mov byte [ebp - 0x1c], 0
jmp 0x687178db
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
cmp eax, 0xe
ja 0x687178a8
mov eax, dword [0x687190b0]
mov ecx, dword [0x687313e8]
mov dword [ebp - 0x34], eax
sub eax, 1
mov dword [ebp - 0x2c], ecx
mov ecx, eax
js 0x68717bc9
mov dword [ebp - 0x3c], esi
xor edx, edx
mov dword [ebp - 0x30], ebx
mov ebx, edx
lea esi, cs:[esi]
lea eax, [ecx + ebx]
mov dword [ebp - 0x20], ecx
mov esi, eax
shr esi, 0x1f
add esi, eax
mov eax, dword [ebp - 0x2c]
sar esi, 1
mov edi, esi
shl edi, 4
add edi, eax
lea eax, [edi + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcmp]
mov ecx, dword [ebp - 0x20]
test eax, eax
je 0x68717b35
js 0x68717a58
lea ebx, [esi + 1]
cmp ecx, ebx
jge 0x68717990
mov edx, ebx
mov esi, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x30]
mov edi, edx
mov dword [ebp - 0x20], edx
mov eax, dword [0x687313ec]
shl edi, 4
cmp dword [ebp - 0x34], eax
jge 0x68717b55
mov eax, dword [ebp - 0x2c]
add edi, eax
mov eax, dword [ebp - 0x34]
cmp edx, eax
jge 0x68717a22
sub eax, edx
mov dword [esp + 4], edi
shl eax, 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x2c]
add eax, 1
shl eax, 4
add ecx, eax
mov dword [esp], ecx
call dword [sym.imp.ucrtbase.dll_memmove]
lea eax, [edi + 1]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
movzx eax, byte [ebp - 0x1c]
not eax
and al, byte [0x687190b4]
or al, byte [ebp - 0x24]
mov byte [edi], al
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [0x687190b0], eax
jmp 0x687178a8
lea ecx, [esi - 1]
cmp ebx, ecx
jle 0x68717990
jmp 0x687179d4
mov byte [ebp - 0x1c], 0xff
mov byte [ebp - 0x24], 0
mov edx, ebx
movzx eax, byte [edx + 1]
lea ebx, [edx + 1]
jmp 0x687178d7
mov byte [ebp - 0x24], 0xff
mov edx, ebx
jmp 0x68717a7a
cmp dword [ebx], 0x6d786966
je 0x68717b10
cmp dword [ebx], 0x63617274
jne 0x687178a8
cmp byte [ebx + 4], 0x65
jne 0x687178a8
mov byte [ebp - 0x1c], 8
jmp 0x68717ae9
mov byte [ebp - 0x1c], 0xff
mov ebx, edx
mov byte [ebp - 0x24], 0
jmp 0x68717a78
cmp eax, 4
jne 0x687178a8
cmp dword [ebx], 0x6e726177
jne 0x687178a8
mov byte [ebp - 0x1c], 4
cmp cl, 0x2b
je 0x68717bb7
sub ecx, 0x2b
mov eax, ecx
and eax, 0xfd
mov byte [ebp - 0x24], al
je 0x68717a7a
mov byte [ebp - 0x24], 0
mov ebx, edx
jmp 0x687178db
cmp byte [ebx + 4], 0x65
jne 0x68717aa8
mov byte [ebp - 0x1c], 1
jmp 0x68717ae9
mov byte [ebp - 0x24], 0xff
jmp 0x68717a7a
cmp byte [ebx + 2], 0x72
jne 0x687178a8
mov byte [ebp - 0x1c], 2
jmp 0x68717ae9
movzx eax, byte [ebp - 0x1c]
mov esi, dword [ebp - 0x3c]
not eax
and al, byte [edi]
or al, byte [ebp - 0x24]
mov byte [edi], al
jmp 0x687178a8
mov dword [ebp - 0x20], 0
xor edi, edi
xor edx, edx
mov ecx, 0x10
add eax, eax
mov dword [ebp - 0x30], edx
cmp eax, ecx
cmovl eax, ecx
mov dword [0x687313ec], eax
shl eax, 4
mov ecx, eax
mov eax, dword fs:[0x18]
cmp dword [ebp - 0x2c], 0
je 0x68717be1
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0x2c]
mov dword [esp + 4], 0
mov dword [esp + 8], ecx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
mov edx, dword [ebp - 0x30]
sub esp, 0x10
mov dword [ebp - 0x2c], eax
mov dword [0x687313e8], eax
mov eax, dword [0x687190b0]
mov dword [ebp - 0x34], eax
jmp 0x687179f2
movzx eax, byte [ebp - 0x1c]
mov ebx, edx
mov byte [ebp - 0x1c], 0
mov byte [ebp - 0x24], al
jmp 0x68717a78
mov eax, dword [0x687313ec]
mov ecx, dword [ebp - 0x34]
cmp eax, ecx
jle 0x68717b4a
mov edi, dword [ebp - 0x2c]
jmp 0x68717a22
mov dword [esp + 8], ecx
mov dword [esp + 4], 0
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov edx, dword [ebp - 0x30]
sub esp, 0xc
mov dword [ebp - 0x2c], eax
jmp 0x68717ba5