Function at 0x401550
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x38
mov edx, dword [0x402010]
cmp edx, 0xffffffff
je 0x401600
sub edx, 1
js 0x4015d0
mov eax, dword [0x405088]
xor edi, edi
mov ecx, edi
mov edi, edx
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 8]
add eax, 1
mov dword [ebp - 0x18], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
mov dword [ebp - 0x1c], eax
jmp 0x401597
lea ecx, [ebx + 1]
cmp edi, ecx
jl 0x4015d0
lea eax, [edi + ecx]
mov dword [ebp - 0x10], ecx
mov ebx, eax
shr ebx, 0x1f
add ebx, eax
sar ebx, 1
mov esi, ebx
shl esi, 4
add esi, dword [ebp - 0x14]
lea eax, [esi + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x18]
mov dword [esp], eax
mov eax, dword [ebp - 0x1c]
call eax
test eax, eax
mov ecx, dword [ebp - 0x10]
je 0x4015f0
jns 0x401590
lea edi, [ebx - 1]
cmp edi, ecx
jge 0x401597
mov edx, dword [ebp + 8]
movzx eax, byte [0x402014]
cmp byte [edx], 0
js 0x401702
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [esi]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.WINEDEBUG
call dword [sym.imp.ucrtbase.dll_getenv]
test eax, eax
mov dword [0x402010], 0
je 0x4015d0
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__strdup]
test eax, eax
mov dword [ebp - 0x24], eax
mov ebx, dword [ebp - 0x24]
je 0x4016f7
mov dword [esp + 4], 0x2c
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
mov dword [ebp - 0x10], 0
je 0x401657
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x10], edx
mov dword [esp + 4], 0x404060
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcspn]
lea edi, [ebx + eax]
mov dword [ebp - 0x14], eax
movzx edx, byte [edi]
test dl, dl
je 0x401710
cmp edi, ebx
jbe 0x4017f0
mov dword [ebp - 0x18], edi
mov edi, dword [ebp - 0x14]
mov eax, 5
mov ecx, str.fixme
xor esi, esi
mov dword [ebp - 0x14], ebx
mov byte [ebp - 0x1c], dl
mov ebx, ecx
cmp edi, eax
jne 0x4016ba
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x401862
add esi, 1
cmp esi, 4
je 0x4016e0
mov ebx, dword [esi*4 + 0x4040e4]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
cmp edi, eax
je 0x40169f
add esi, 1
cmp esi, 4
jne 0x4016c2
nop
mov ebx, dword [ebp - 0x10]
test ebx, ebx
jne 0x401632
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [0x402010]
jmp 0x401568
mov byte [edx], al
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, byte [ebx]
cmp dl, 0x2d
je 0x401751
lea eax, [edx - 0x2b]
mov byte [ebp - 0x18], 0xff
mov byte [ebp - 0x14], 0
test al, 0xfd
je 0x401759
test dl, dl
je 0x4016e0
mov edi, 0x404063
mov ecx, 4
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x401764
movzx eax, byte [ebp - 0x14]
not eax
and al, byte [0x402014]
or al, byte [ebp - 0x18]
mov byte [0x402014], al
jmp 0x4016e0
mov byte [ebp - 0x14], 0xff
mov byte [ebp - 0x18], 0
mov edi, ebx
lea ebx, [edi + 1]
movzx edx, byte [edi + 1]
jmp 0x401727
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
cmp eax, 0xe
mov dword [ebp - 0x30], eax
ja 0x4016e0
mov eax, dword [0x402010]
mov edx, dword [0x405088]
mov dword [ebp - 0x34], eax
sub eax, 1
mov dword [ebp - 0x20], edx
mov edx, eax
js 0x4017f7
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
xor edi, edi
mov dword [ebp - 0x28], ebx
mov ecx, edi
mov edi, edx
mov dword [ebp - 0x2c], eax
jmp 0x4017af
lea ecx, [esi + 1]
cmp ecx, edi
jg 0x4018a2
lea eax, [edi + ecx]
mov dword [ebp - 0x1c], ecx
mov esi, eax
shr esi, 0x1f
add esi, eax
sar esi, 1
mov ebx, esi
shl ebx, 4
add ebx, dword [ebp - 0x20]
lea eax, [ebx + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x28]
mov dword [esp], eax
mov eax, dword [ebp - 0x2c]
call eax
test eax, eax
mov ecx, dword [ebp - 0x1c]
je 0x401890
jns 0x4017a4
lea edi, [esi - 1]
jmp 0x4017a7
mov ebx, edi
jmp 0x401713
xor esi, esi
mov dword [ebp - 0x1c], 0
xor edi, edi
mov eax, dword [0x40508c]
cmp dword [ebp - 0x34], eax
jge 0x401933
add esi, dword [ebp - 0x20]
cmp edi, dword [ebp - 0x34]
jl 0x401909
mov edx, dword [ebp - 0x30]
lea eax, [esi + 1]
add edx, 1
cmp edx, 4
jae 0x4018b4
test edx, edx
je 0x401841
movzx ecx, byte [ebx]
test dl, 2
mov byte [esi + 1], cl
jne 0x4019b7
movzx eax, byte [ebp - 0x14]
not eax
and al, byte [0x402014]
or al, byte [ebp - 0x18]
mov byte [esi], al
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [0x402010], eax
jmp 0x4016e0
movzx edx, byte [ebp - 0x1c]
mov eax, 1
mov ecx, esi
shl eax, cl
mov edi, dword [ebp - 0x18]
mov byte [ebp - 0x14], al
cmp dl, 0x2b
je 0x4018f2
lea ebx, [edx - 0x2b]
and ebx, 0xfd
je 0x401900
mov ebx, edi
mov byte [ebp - 0x18], 0
jmp 0x40172b
movzx eax, byte [ebp - 0x14]
not eax
and al, byte [ebx]
or al, byte [ebp - 0x18]
mov byte [ebx], al
jmp 0x4016e0
mov esi, ecx
mov ebx, dword [ebp - 0x28]
mov edi, ecx
mov dword [ebp - 0x1c], ecx
shl esi, 4
jmp 0x401802
mov ecx, dword [ebx]
mov dword [esi + 1], ecx
mov ecx, dword [ebx + edx - 4]
mov dword [eax + edx - 4], ecx
lea ecx, [esi + 5]
and ecx, 0xfffffffc
sub eax, ecx
sub ebx, eax
add eax, edx
and eax, 0xfffffffc
cmp eax, 4
jb 0x401841
and eax, 0xfffffffc
mov edx, eax
xor eax, eax
mov edi, dword [ebx + eax]
mov dword [ecx + eax], edi
add eax, 4
cmp eax, edx
jb 0x4018e0
jmp 0x401841
mov ebx, edi
mov byte [ebp - 0x18], al
mov byte [ebp - 0x14], 0
jmp 0x401759
mov byte [ebp - 0x18], 0
jmp 0x40175b
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], esi
sub eax, edi
shl eax, 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
add eax, 1
shl eax, 4
add eax, dword [ebp - 0x20]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x40181c
add eax, eax
mov edx, 0x10
mov ecx, dword [ebp - 0x20]
cmp eax, 0x10
cmovl eax, edx
mov dword [0x40508c], eax
shl eax, 4
mov edx, eax
mov eax, dword fs:[0x18]
test ecx, ecx
je 0x401994
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x20]
mov dword [esp + 4], 0
mov dword [esp + 8], edx
mov eax, dword [eax + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [0x405088], eax
mov eax, dword [0x402010]
mov dword [ebp - 0x34], eax
jmp 0x401810
mov dword [esp + 8], edx
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]
sub esp, 0xc
mov dword [ebp - 0x20], eax
jmp 0x40197f
movzx ecx, word [ebx + edx - 2]
mov word [eax + edx - 2], cx
jmp 0x401841