Function at 0x405ac0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x3c
mov edx, dword [0x4080a0]
cmp edx, 0xffffffff
je 0x405b70
sub edx, 1
js 0x405b39
mov eax, dword [0x4110a8]
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 0x405b07
lea ecx, [ebx + 1]
cmp ecx, edi
jg 0x405b39
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 0x405b60
jns 0x405b00
lea edi, [ebx - 1]
cmp ecx, edi
jle 0x405b07
mov edx, dword [ebp + 8]
movzx eax, byte [0x4080a4]
cmp byte [edx], 0
js 0x405b50
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 [0x4080a0], 0
test eax, eax
je 0x405b39
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll__strdup]
mov dword [ebp - 0x38], eax
test eax, eax
je 0x405c69
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 0x405bc8
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x20], edx
mov edi, dword [ebp - 0x1c]
mov dword [esp + 4], 0x40fb7a
mov dword [esp], edi
call sym._strcspn
mov edx, eax
lea esi, [edi + edx]
movzx ebx, byte [esi]
test bl, bl
je 0x405c74
cmp esi, edi
jbe 0x405cf0
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 0x405c2a
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 0x405ddb
add esi, 1
cmp esi, 4
je 0x405c50
mov edi, dword [esi*4 + 0x40fc00]
mov dword [esp], edi
call sym._strlen
cmp ebx, eax
je 0x405c0f
add esi, 1
cmp esi, 4
jne 0x405c32
lea esi, [esi]
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
test eax, eax
jne 0x405ba1
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
call sym._free
mov edx, dword [0x4080a0]
jmp 0x405ad8
mov eax, dword [ebp - 0x1c]
movzx ebx, byte [eax]
cmp bl, 0x2d
je 0x405cd0
lea eax, [ebx - 0x2b]
and eax, 0xfd
mov byte [ebp - 0x24], al
je 0x405cf5
mov byte [ebp - 0x29], 0xff
mov byte [ebp - 0x24], 0
test bl, bl
je 0x405c50
mov esi, dword [ebp - 0x1c]
mov edi, 0x40fb7d
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
seta al
sbb al, 0
test al, al
jne 0x405d00
movzx eax, byte [ebp - 0x24]
not eax
and al, byte [0x4080a4]
or al, byte [ebp - 0x29]
mov byte [0x4080a4], al
jmp 0x405c50
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 0x405c94
mov dword [ebp - 0x1c], esi
jmp 0x405c7a
mov esi, dword [ebp - 0x1c]
mov byte [ebp - 0x29], 0xff
jmp 0x405cdb
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call sym._strlen
cmp eax, 0xe
ja 0x405c50
mov eax, dword [0x4080a0]
mov edx, dword [0x4110a8]
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], edx
sub eax, 1
js 0x405ea9
xor edi, edi
mov ecx, edi
mov edi, eax
jmp 0x405d47
lea ecx, [ebx + 1]
cmp ecx, edi
jg 0x405d89
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 0x405d77
jns 0x405d40
lea edi, [ebx - 1]
jmp 0x405d43
movzx eax, byte [ebp - 0x24]
not eax
and al, byte [esi]
or al, byte [ebp - 0x29]
mov byte [esi], al
jmp 0x405c50
mov ebx, ecx
mov edi, ecx
mov esi, ecx
shl ebx, 4
mov eax, dword [0x4110ac]
cmp dword [ebp - 0x34], eax
jge 0x405e3d
add ebx, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x34]
jl 0x405e17
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 [0x4080a4]
or al, byte [ebp - 0x29]
mov byte [ebx], al
mov eax, dword [ebp - 0x34]
add eax, 1
mov dword [0x4080a0], eax
jmp 0x405c50
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 0x405e9a
sub ebx, 0x2b
and ebx, 0xfd
mov byte [ebp - 0x29], bl
je 0x405cdb
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x29], 0
jmp 0x405c98
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 0x405da8
add eax, eax
mov edx, 0x10
cmp eax, 0x10
cmovl eax, edx
mov dword [0x4110ac], eax
shl eax, 4
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x405eb4
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 [0x4110a8], eax
mov eax, dword [0x4080a0]
mov dword [ebp - 0x34], eax
jmp 0x405da0
mov dword [ebp - 0x1c], esi
mov byte [ebp - 0x29], al
mov byte [ebp - 0x24], 0
jmp 0x405cd8
xor ebx, ebx
xor esi, esi
xor edi, edi
jmp 0x405d92
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 0x405e85