Function at 0x4018c0
Capabilities:
Query environment variable

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [0x404014]
cmp edx, 0xffffffff
je 0x401970
sub edx, 1
mov edi, edx
js 0x40192d
mov eax, dword [0x4060a8]
xor ebp, ebp
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x50]
add eax, 1
mov dword [esp + 0x18], eax
jmp 0x4018ff
lea ebp, [ebx + 1]
cmp ebp, edi
jg 0x40192d
lea ebx, [edi + ebp]
sar ebx, 1
mov esi, ebx
shl esi, 4
add esi, dword [esp + 0x14]
lea eax, [esi + 1]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x18]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x401960
jns 0x4018f8
lea edi, [ebx - 1]
cmp ebp, edi
jle 0x4018ff
mov ecx, dword [esp + 0x50]
movzx eax, byte [0x404018]
cmp byte [ecx], 0
js 0x401948
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov ecx, dword [esp + 0x50]
mov byte [ecx], al
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
movzx eax, byte [esi]
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.WINEDEBUG
call sym._getenv
mov dword [0x404014], 0
test eax, eax
je 0x40192d
mov dword [esp], eax
call sym.__strdup
mov dword [esp + 0x28], eax
mov ebp, eax
test eax, eax
je 0x401b67
mov dword [esp + 4], 0x2c
mov dword [esp], ebp
call sym._strchr
mov dword [esp + 0x14], 0
test eax, eax
je 0x4019c6
lea ecx, [eax + 1]
mov byte [eax], 0
mov dword [esp + 0x14], ecx
mov dword [esp + 4], 0x40508e
mov dword [esp], ebp
call sym._strcspn
lea edi, [ebp + eax]
mov ebx, eax
movzx esi, byte [edi]
mov eax, esi
test al, al
je 0x401a68
cmp edi, ebp
jbe 0x401ad0
xor ecx, ecx
mov dword [esp + 0x18], edi
mov edx, str.fixme
mov eax, 5
mov edi, ecx
mov ecx, esi
mov esi, edx
mov byte [esp + 0x1c], cl
cmp ebx, eax
jne 0x401a27
mov dword [esp + 8], ebx
mov dword [esp + 4], esi
mov dword [esp], ebp
call sym._memcmp
test eax, eax
je 0x401be3
add edi, 1
cmp edi, 4
je 0x401a50
mov esi, dword [edi*4 + 0x405114]
mov dword [esp], esi
call sym._strlen
cmp ebx, eax
je 0x401a0f
add edi, 1
cmp edi, 4
jne 0x401a2f
lea esi, [esi]
mov eax, dword [esp + 0x14]
test eax, eax
je 0x401b5b
mov ebp, dword [esp + 0x14]
jmp 0x4019a0
movzx esi, byte [ebp]
mov eax, esi
cmp al, 0x2d
je 0x401ab8
lea ebx, [esi - 0x2b]
and ebx, 0xfd
je 0x401ad8
mov byte [esp + 0x18], 0xff
xor ebx, ebx
mov eax, esi
test al, al
je 0x401a50
mov edi, 0x405091
mov ecx, 4
mov esi, ebp
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
test al, al
jne 0x401ae8
not ebx
and bl, byte [0x404018]
or bl, byte [esp + 0x18]
mov byte [0x404018], bl
jmp 0x401a50
mov byte [esp + 0x18], 0
mov ebx, 0xffffffff
mov edi, ebp
movzx esi, byte [edi + 1]
lea ebp, [edi + 1]
jmp 0x401a84
mov ebp, edi
jmp 0x401a6c
mov byte [esp + 0x18], 0xff
mov edi, ebp
jmp 0x401ac4
mov dword [esp], ebp
call sym._strlen
cmp eax, 0xe
ja 0x401a50
mov eax, dword [0x404014]
mov ecx, dword [0x4060a8]
mov dword [esp + 0x24], eax
mov dword [esp + 0x1c], ecx
sub eax, 1
js 0x401cc0
xor edx, edx
mov dword [esp + 0x20], ebp
mov byte [esp + 0x2f], bl
mov ebp, edx
mov ebx, eax
jmp 0x401b2f
lea ebp, [esi + 1]
cmp ebp, ebx
jg 0x401b88
lea esi, [ebx + ebp]
sar esi, 1
mov edi, esi
shl edi, 4
add edi, dword [esp + 0x1c]
lea eax, [edi + 1]
mov dword [esp + 4], eax
mov eax, dword [esp + 0x20]
mov dword [esp], eax
call sym._strcmp
test eax, eax
je 0x401b72
jns 0x401b28
lea ebx, [esi - 1]
jmp 0x401b2b
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sym._free
mov edx, dword [0x404014]
jmp 0x4018d6
movzx ebx, byte [esp + 0x2f]
mov eax, ebx
not eax
and al, byte [edi]
or al, byte [esp + 0x18]
mov byte [edi], al
jmp 0x401a50
mov edx, ebp
movzx ebx, byte [esp + 0x2f]
mov ebp, dword [esp + 0x20]
mov esi, edx
mov edi, edx
shl esi, 4
mov eax, dword [0x4060ac]
cmp dword [esp + 0x24], eax
jge 0x401c48
add esi, dword [esp + 0x1c]
cmp edx, dword [esp + 0x24]
jl 0x401c20
lea eax, [esi + 1]
mov dword [esp + 4], ebp
mov dword [esp], eax
call sym._strcpy
mov eax, ebx
not eax
and al, byte [0x404018]
or al, byte [esp + 0x18]
mov byte [esi], al
mov eax, dword [esp + 0x24]
add eax, 1
mov dword [0x404014], eax
jmp 0x401a50
movzx esi, byte [esp + 0x1c]
mov ecx, edi
mov eax, 1
mov edi, dword [esp + 0x18]
shl eax, cl
mov ecx, esi
mov ebx, eax
cmp cl, 0x2b
je 0x401cb3
lea eax, [esi - 0x2b]
and eax, 0xfd
mov byte [esp + 0x18], al
je 0x401ac4
mov byte [esp + 0x18], 0
mov ebp, edi
jmp 0x401a8a
mov eax, dword [esp + 0x24]
mov dword [esp + 4], esi
sub eax, edx
shl eax, 4
mov dword [esp + 8], eax
lea eax, [edi + 1]
shl eax, 4
add eax, dword [esp + 0x1c]
mov dword [esp], eax
call sym._memmove
jmp 0x401bb3
add eax, eax
mov ecx, 0x10
mov dword [esp + 0x20], edx
cmp eax, 0x10
cmovl eax, ecx
mov ecx, dword fs:[0x18]
mov dword [0x4060ac], eax
shl eax, 4
cmp dword [esp + 0x1c], 0
je 0x401ccb
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x1c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapReAlloc_16
sub esp, 0x10
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x1c]
mov dword [0x4060a8], eax
mov eax, dword [0x404014]
mov dword [esp + 0x24], eax
jmp 0x401ba9
mov byte [esp + 0x18], al
mov ebp, edi
xor ebx, ebx
jmp 0x401ac2
xor esi, esi
xor edi, edi
xor edx, edx
jmp 0x401b9a
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [ecx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call sym._HeapAlloc_12
sub esp, 0xc
mov dword [esp + 0x1c], eax
mov edx, dword [esp + 0x20]
jmp 0x401c9c