Function at 0x401a30
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [0x404014]
cmp edx, 0xffffffff
je 0x401ae0
sub edx, 1
js 0x401aa9
mov eax, dword [0x4060a8]
xor edi, edi
mov ecx, edi
mov edi, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 8]
add eax, 1
mov dword [ebp - 0x24], eax
jmp 0x401a77
lea ecx, [ebx + 1]
cmp ecx, edi
jg 0x401aa9
lea ebx, [edi + ecx]
mov dword [ebp - 0x1c], ecx
sar ebx, 1
mov esi, ebx
shl esi, 4
add esi, dword [ebp - 0x20]
lea eax, [esi + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._strcmp
mov ecx, dword [ebp - 0x1c]
test eax, eax
je 0x401ad0
jns 0x401a70
lea edi, [ebx - 1]
cmp ecx, edi
jle 0x401a77
mov edx, dword [ebp + 8]
movzx eax, byte [0x404018]
cmp byte [edx], 0
js 0x401ac0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov edx, dword [ebp + 8]
mov byte [edx], al
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 sym._getenv
mov dword [0x404014], 0
test eax, eax
je 0x401aa9
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__strdup]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x401bd9
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], 0x2c
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x20], 0
test eax, eax
je 0x401b38
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], 0x405056
mov dword [esp], edi
call sym._strcspn
mov edx, eax
lea esi, [edi + edx]
movzx ebx, byte [esi]
test bl, bl
je 0x401be4
cmp esi, edi
jbe 0x401c60
xor edi, edi
mov ecx, str.fixme
mov byte [ebp - 0x28], bl
mov eax, 5
mov ebx, edx
mov dword [ebp - 0x24], esi
mov esi, edi
mov edi, ecx
cmp ebx, eax
jne 0x401b9a
mov eax, dword [ebp - 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x401d4b
add esi, 1
cmp esi, 4
je 0x401bc0
mov edi, dword [esi*4 + 0x4050dc]
mov dword [esp], edi
call sym._strlen
cmp ebx, eax
je 0x401b7f
add esi, 1
cmp esi, 4
jne 0x401ba2
lea esi, [esi]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x401b11
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._free
mov edx, dword [0x404014]
jmp 0x401a48
mov eax, dword [ebp - 0x1c]
movzx ebx, byte [eax]
cmp bl, 0x2d
je 0x401c40
lea eax, [ebx - 0x2b]
and eax, 0xfd
mov byte [ebp - 0x24], al
je 0x401c65
mov byte [ebp - 0x29], 0xff
mov byte [ebp - 0x24], 0
test bl, bl
je 0x401bc0
mov esi, dword [ebp - 0x1c]
mov edi, 0x405059
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
test al, al
jne 0x401c70
movzx eax, byte [ebp - 0x24]
not eax
and al, byte [0x404018]
or al, byte [ebp - 0x29]
mov byte [0x404018], al
jmp 0x401bc0
mov byte [ebp - 0x24], 0xff
mov byte [ebp - 0x29], 0
mov esi, dword [ebp - 0x1c]
lea eax, [esi + 1]
movzx ebx, byte [esi + 1]
mov dword [ebp - 0x1c], eax
jmp 0x401c04
mov dword [ebp - 0x1c], esi
jmp 0x401bea
mov esi, dword [ebp - 0x1c]
mov byte [ebp - 0x29], 0xff
jmp 0x401c4b
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strlen
cmp eax, 0xe
ja 0x401bc0
mov eax, dword [0x404014]
mov edx, dword [0x4060a8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
sub eax, 1
js 0x401e19
xor edi, edi
mov ecx, edi
mov edi, eax
jmp 0x401cb7
lea ecx, [ebx + 1]
cmp ecx, edi
jg 0x401cf9
lea ebx, [edi + ecx]
mov dword [ebp - 0x28], ecx
sar ebx, 1
mov esi, ebx
shl esi, 4
add esi, dword [ebp - 0x30]
lea eax, [esi + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strcmp
mov ecx, dword [ebp - 0x28]
test eax, eax
je 0x401ce7
jns 0x401cb0
lea edi, [ebx - 1]
jmp 0x401cb3
movzx eax, byte [ebp - 0x24]
not eax
and al, byte [esi]
or al, byte [ebp - 0x29]
mov byte [esi], al
jmp 0x401bc0
mov ebx, ecx
mov edi, ecx
mov esi, ecx
shl ebx, 4
mov eax, dword [0x4060ac]
cmp dword [ebp - 0x34], eax
jge 0x401dad
add ebx, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x34]
jl 0x401d87
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
lea eax, [ebx + 1]
mov dword [esp], eax
call sym._strcpy
movzx eax, byte [ebp - 0x24]
not eax
and al, byte [0x404018]
or al, byte [ebp - 0x29]
mov byte [ebx], al
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [0x404014], eax
jmp 0x401bc0
mov edi, esi
mov eax, 1
movzx ebx, byte [ebp - 0x28]
mov esi, dword [ebp - 0x24]
mov ecx, edi
shl eax, cl
mov byte [ebp - 0x24], al
cmp bl, 0x2b
je 0x401e0a
sub ebx, 0x2b
and ebx, 0xfd
mov byte [ebp - 0x29], bl
je 0x401c4b
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x29], 0
jmp 0x401c08
mov eax, dword [ebp - 0x34]
mov dword [esp + 4], ebx
sub eax, edi
shl eax, 4
mov dword [esp + 8], eax
lea eax, [esi + 1]
shl eax, 4
add eax, dword [ebp - 0x30]
mov dword [esp], eax
call sym._memmove
jmp 0x401d18
add eax, eax
mov edx, 0x10
cmp eax, 0x10
cmovl eax, edx
mov dword [0x4060ac], eax
shl eax, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x401e24
call sym._GetProcessHeap_0
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x30]
mov dword [esp + 8], edx
call sym._HeapReAlloc_16
mov dword [ebp - 0x30], eax
sub esp, 0x10
mov eax, dword [ebp - 0x30]
mov dword [0x4060a8], eax
mov eax, dword [0x404014]
mov dword [ebp - 0x34], eax
jmp 0x401d10
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x29], al
mov byte [ebp - 0x24], 0
jmp 0x401c48
xor ebx, ebx
xor esi, esi
xor edi, edi
jmp 0x401d02
call sym._GetProcessHeap_0
mov edx, dword [ebp - 0x28]
mov dword [esp + 4], 0
mov dword [esp], eax
mov dword [esp + 8], edx
call sym._HeapAlloc_12
sub esp, 0xc
mov dword [ebp - 0x30], eax
jmp 0x401df5