Function at 0x402ff0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x28
mov ecx, dword [0x405010]
cmp ecx, 0xffffffff
je 0x403011
test ecx, ecx
jg 0x40334a
jmp 0x4033a0
push str.WINEDEBUG
call dword [sym.imp.ucrtbase.dll_getenv]
add esp, 4
mov dword [0x405010], 0
test eax, eax
je 0x4033a0
push eax
call dword [sym.imp.ucrtbase.dll__strdup]
add esp, 4
test eax, eax
je 0x403340
mov esi, dword [sym.imp.ucrtbase.dll_strchr]
mov dword [ebp - 0x28], eax
mov edi, eax
jmp 0x40307b
mov eax, dword [ebp - 0x18]
not al
and al, byte [0x405014]
or al, byte [ebp - 0x14]
mov byte [0x405014], al
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edi, dword [ebp - 0x20]
test edi, edi
je 0x403334
push 0x2c
push edi
call esi
add esp, 8
mov dword [ebp - 0x20], 0
test eax, eax
je 0x403097
mov ecx, eax
inc ecx
mov dword [ebp - 0x20], ecx
mov byte [eax], 0
push 0x40454e
push edi
call dword [sym.imp.ucrtbase.dll_strcspn]
add esp, 8
lea edx, [edi + eax]
cmp byte [edi + eax], 0
cmove edx, edi
mov eax, edx
sub eax, edi
jbe 0x403100
cmp eax, 3
je 0x40311b
cmp eax, 4
je 0x403139
cmp eax, 5
jne 0x403070
mov eax, dword [edi]
mov ecx, 0x6d786966
xor eax, ecx
movzx ecx, byte [edi + 4]
xor ecx, 0x65
or ecx, eax
je 0x40314b
mov eax, dword [edi]
mov ecx, 0x63617274
xor eax, ecx
movzx ecx, byte [edi + 4]
xor ecx, 0x65
or ecx, eax
jne 0x403070
mov eax, edx
mov cl, 3
jmp 0x40314f
movzx eax, byte [edx]
cmp al, 0x2d
sete cl
setne bl
neg bl
mov dword [ebp - 0x14], ebx
neg cl
mov dword [ebp - 0x18], ecx
cmp al, 0x2d
jne 0x403176
jmp 0x40317e
movzx eax, word [edi]
xor eax, 0x7265
movzx ecx, byte [edi + 2]
xor ecx, 0x72
or cx, ax
jne 0x403070
mov eax, edx
mov cl, 1
jmp 0x40314f
cmp dword [edi], 0x6e726177
jne 0x403070
mov eax, edx
mov cl, 2
jmp 0x40314f
mov eax, edx
xor ecx, ecx
mov dl, 1
shl dl, cl
mov ecx, eax
movzx eax, byte [eax]
cmp al, 0x2b
movzx edi, dl
mov edx, ecx
mov ebx, edi
mov ecx, 0
cmove ebx, ecx
mov dword [ebp - 0x18], ebx
cmovne edi, ecx
mov dword [ebp - 0x14], edi
cmp al, 0x2d
je 0x40317e
movzx ecx, al
cmp ecx, 0x2b
jne 0x403183
movzx eax, byte [edx + 1]
inc edx
test al, al
je 0x403070
push 0x404551
push edx
mov edi, edx
call dword [sym.imp.ucrtbase.dll_strcmp]
add esp, 8
test eax, eax
je 0x403050
mov ebx, dword [0x405010]
push edi
call dword [sym.imp.ucrtbase.dll_strlen]
add esp, 4
cmp eax, 0xe
ja 0x403070
mov edx, edi
test ebx, ebx
mov dword [ebp - 0x24], ebx
jle 0x403227
lea ecx, [ebx - 1]
xor edi, edi
mov eax, dword [0x4060e0]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x2c], edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov dword [ebp - 0x10], ecx
lea eax, [ecx + edi]
mov esi, eax
shr esi, 0x1f
add esi, eax
sar esi, 1
mov ebx, edi
mov edi, esi
shl edi, 4
mov eax, dword [ebp - 0x1c]
add eax, edi
inc eax
push eax
push edx
call dword [sym.imp.ucrtbase.dll_strcmp]
add esp, 8
test eax, eax
je 0x403282
lea ecx, [esi - 1]
inc esi
test eax, eax
mov eax, dword [ebp - 0x10]
cmovs eax, ecx
mov ecx, eax
cmovns ebx, esi
cmp ebx, eax
mov edx, dword [ebp - 0x2c]
mov edi, ebx
jle 0x4031e0
jmp 0x403229
xor edi, edi
mov ecx, dword [0x4060e4]
mov ebx, dword [ebp - 0x24]
cmp ebx, ecx
jge 0x403240
mov eax, dword [0x4060e0]
jmp 0x4032c4
mov ebx, edi
mov edi, edx
add ecx, ecx
cmp ecx, 0x11
mov eax, 0x10
cmovl ecx, eax
mov dword [0x4060e4], ecx
shl ecx, 4
mov edx, dword [0x4060e0]
test edx, edx
je 0x403298
mov eax, dword fs:[0x18]
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov eax, dword [eax + 0x30]
push ecx
push edx
push 0
push dword [eax + 0x18]
call dword [sym.imp.kernel32.dll_HeapReAlloc]
jmp 0x4032b3
mov eax, dword [ebp - 0x18]
not al
mov ecx, dword [ebp - 0x1c]
and al, byte [ecx + edi]
or al, byte [ebp - 0x14]
mov byte [ecx + edi], al
jmp 0x403329
mov eax, dword fs:[0x18]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x30]
mov eax, dword [eax + 0x30]
push ecx
push 0
push dword [eax + 0x18]
call dword [sym.imp.kernel32.dll_HeapAlloc]
mov dword [0x4060e0], eax
mov ecx, dword [0x405010]
mov edx, edi
mov edi, ebx
mov ebx, ecx
mov esi, ebx
sub esi, edi
jle 0x4032fd
mov dword [ebp - 0x10], eax
mov ecx, edi
shl ecx, 4
mov dword [ebp - 0x24], ebx
mov ebx, edi
mov edi, edx
mov eax, dword [ebp - 0x10]
lea edx, [eax + ecx]
add edx, 0x10
add ecx, dword [ebp - 0x10]
shl esi, 4
push esi
push ecx
push edx
call sub.ucrtbase.dll_memmove
mov eax, dword [ebp - 0x10]
mov edx, edi
mov edi, ebx
mov ebx, dword [ebp - 0x24]
add esp, 0xc
shl edi, 4
lea ecx, [eax + edi]
inc ecx
push edx
push ecx
mov esi, eax
call dword [sym.imp.ucrtbase.dll_strcpy]
add esp, 8
mov eax, dword [ebp - 0x18]
not al
and al, byte [0x405014]
or al, byte [ebp - 0x14]
mov byte [esi + edi], al
inc ebx
mov dword [0x405010], ebx
mov esi, dword [sym.imp.ucrtbase.dll_strchr]
jmp 0x403070
push dword [ebp - 0x28]
call dword [sym.imp.ucrtbase.dll_free]
add esp, 4
mov ecx, dword [0x405010]
test ecx, ecx
jle 0x4033a0
dec ecx
mov eax, dword [0x4060e0]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 8]
inc eax
mov dword [ebp - 0x1c], eax
xor esi, esi
nop
nop
nop
nop
mov dword [ebp - 0x20], ecx
lea eax, [esi + ecx]
mov ebx, eax
shr ebx, 0x1f
add ebx, eax
sar ebx, 1
mov edi, ebx
shl edi, 4
mov eax, dword [ebp - 0x10]
add eax, edi
inc eax
push eax
push dword [ebp - 0x1c]
call dword [sym.imp.ucrtbase.dll_strcmp]
add esp, 8
test eax, eax
je 0x4033ba
lea ecx, [ebx - 1]
inc ebx
test eax, eax
mov eax, dword [ebp - 0x20]
cmovs eax, ecx
mov ecx, eax
cmovns esi, ebx
cmp esi, eax
jle 0x403360
mov dword [ebp - 0x10], 0x405014
mov ecx, dword [ebp + 8]
cmp byte [ecx], 0
jns 0x4033bd
movzx eax, byte [0x405014]
mov byte [ecx], al
jmp 0x4033bd
add dword [ebp - 0x10], edi
mov eax, dword [ebp - 0x10]
movzx eax, byte [eax]
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret