Function at 0x4031f0
Capabilities:
Query environment variable

Disassembly:
lea ecx, [esp + 4]
and esp, 0xfffffff0
push dword [ecx - 4]
push ebp
mov ebp, esp
push edi
push esi
push ebx
push ecx
sub esp, 0x48
mov edx, dword [0x404010]
mov eax, dword [ecx]
cmp edx, 0xffffffff
mov dword [ebp - 0x2c], eax
je 0x4032b0
sub edx, 1
js 0x403280
mov eax, dword [0x406088]
xor edi, edi
mov ecx, edi
mov edi, edx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x2c]
add eax, 1
mov dword [ebp - 0x24], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
mov dword [ebp - 0x28], eax
jmp 0x403247
lea ecx, [ebx + 1]
cmp edi, ecx
jl 0x403280
lea eax, [edi + ecx]
mov dword [ebp - 0x1c], ecx
mov ebx, eax
shr ebx, 0x1f
add ebx, eax
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
mov eax, dword [ebp - 0x28]
call eax
test eax, eax
mov ecx, dword [ebp - 0x1c]
je 0x4032a0
jns 0x403240
lea edi, [ebx - 1]
cmp edi, ecx
jge 0x403247
mov edx, dword [ebp - 0x2c]
movzx eax, byte [0x404014]
cmp byte [edx], 0
js 0x4033b2
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx eax, byte [esi]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
mov dword [esp], str.WINEDEBUG
call dword [sym.imp.ucrtbase.dll_getenv]
test eax, eax
mov dword [0x404010], 0
je 0x403280
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__strdup]
test eax, eax
mov dword [ebp - 0x34], eax
mov ebx, dword [ebp - 0x34]
je 0x4033a7
mov dword [esp + 4], 0x2c
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
mov dword [ebp - 0x1c], 0
je 0x403307
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x1c], edx
mov dword [esp + 4], 0x40539c
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strcspn]
lea edi, [ebx + eax]
mov dword [ebp - 0x20], eax
movzx edx, byte [edi]
test dl, dl
je 0x4033c0
cmp edi, ebx
jbe 0x4034a0
mov dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x20]
mov eax, 5
mov ecx, str.fixme
xor esi, esi
mov dword [ebp - 0x20], ebx
mov byte [ebp - 0x28], dl
mov ebx, ecx
cmp edi, eax
jne 0x40336a
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], edi
mov dword [esp + 4], ebx
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x4034fd
add esi, 1
cmp esi, 4
je 0x403390
mov ebx, dword [esi*4 + 0x405420]
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
cmp edi, eax
je 0x40334f
add esi, 1
cmp esi, 4
jne 0x403372
nop
mov ebx, dword [ebp - 0x1c]
test ebx, ebx
jne 0x4032e2
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov edx, dword [0x404010]
jmp 0x403218
mov byte [edx], al
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx edx, byte [ebx]
cmp dl, 0x2d
je 0x403401
lea eax, [edx - 0x2b]
mov byte [ebp - 0x24], 0xff
mov byte [ebp - 0x20], 0
test al, 0xfd
je 0x403409
test dl, dl
je 0x403390
mov edi, 0x40539f
mov ecx, 4
mov esi, ebx
repe cmpsb byte [esi], byte es:[edi]
jne 0x403414
movzx eax, byte [ebp - 0x20]
not eax
and al, byte [0x404014]
or al, byte [ebp - 0x24]
mov byte [0x404014], al
jmp 0x403390
mov byte [ebp - 0x20], 0xff
mov byte [ebp - 0x24], 0
mov edi, ebx
lea ebx, [edi + 1]
movzx edx, byte [edi + 1]
jmp 0x4033d7
mov dword [esp], ebx
call dword [sym.imp.ucrtbase.dll_strlen]
cmp eax, 0xe
ja 0x403390
mov eax, dword [0x404010]
mov edx, dword [0x406088]
mov dword [ebp - 0x40], eax
sub eax, 1
mov dword [ebp - 0x30], edx
mov edx, eax
js 0x4034a7
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
xor edi, edi
mov dword [ebp - 0x38], ebx
mov ecx, edi
mov edi, edx
mov dword [ebp - 0x3c], eax
jmp 0x40345c
lea ecx, [esi + 1]
cmp ecx, edi
jg 0x40353d
lea eax, [edi + ecx]
mov dword [ebp - 0x28], ecx
mov esi, eax
shr esi, 0x1f
add esi, eax
sar esi, 1
mov ebx, esi
shl ebx, 4
add ebx, dword [ebp - 0x30]
lea eax, [ebx + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x38]
mov dword [esp], eax
mov eax, dword [ebp - 0x3c]
call eax
test eax, eax
mov ecx, dword [ebp - 0x28]
je 0x40352b
jns 0x403451
lea edi, [esi - 1]
jmp 0x403454
mov ebx, edi
jmp 0x4033c3
xor esi, esi
mov dword [ebp - 0x28], 0
xor edi, edi
mov eax, dword [0x40608c]
cmp dword [ebp - 0x40], eax
jge 0x403590
add esi, dword [ebp - 0x30]
cmp edi, dword [ebp - 0x40]
jl 0x403566
lea eax, [esi + 1]
mov dword [esp + 4], ebx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strcpy]
movzx eax, byte [ebp - 0x20]
not eax
and al, byte [0x404014]
or al, byte [ebp - 0x24]
mov byte [esi], al
mov eax, dword [ebp - 0x40]
add eax, 1
mov dword [0x404010], eax
jmp 0x403390
movzx edx, byte [ebp - 0x28]
mov eax, 1
mov ecx, esi
shl eax, cl
mov edi, dword [ebp - 0x24]
mov byte [ebp - 0x20], al
cmp dl, 0x2b
je 0x40354f
lea ebx, [edx - 0x2b]
and ebx, 0xfd
je 0x40355d
mov ebx, edi
mov byte [ebp - 0x24], 0
jmp 0x4033db
movzx eax, byte [ebp - 0x20]
not eax
and al, byte [ebx]
or al, byte [ebp - 0x24]
mov byte [ebx], al
jmp 0x403390
mov esi, ecx
mov ebx, dword [ebp - 0x38]
mov edi, ecx
mov dword [ebp - 0x28], ecx
shl esi, 4
jmp 0x4034b2
mov ebx, edi
mov byte [ebp - 0x24], al
mov byte [ebp - 0x20], 0
jmp 0x403409
mov byte [ebp - 0x24], 0
jmp 0x40340b
mov eax, dword [ebp - 0x40]
mov dword [esp + 4], esi
sub eax, edi
shl eax, 4
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x28]
add eax, 1
shl eax, 4
add eax, dword [ebp - 0x30]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x4034cc
add eax, eax
mov edx, 0x10
mov ecx, dword [ebp - 0x30]
cmp eax, 0x10
cmovl eax, edx
mov dword [0x40608c], eax
shl eax, 4
mov edx, eax
mov eax, dword fs:[0x18]
test ecx, ecx
je 0x4035f1
mov dword [esp + 0xc], edx
mov edx, dword [ebp - 0x30]
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 - 0x30], eax
mov eax, dword [ebp - 0x30]
mov dword [0x406088], eax
mov eax, dword [0x404010]
mov dword [ebp - 0x40], eax
jmp 0x4034c0
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 - 0x30], eax
jmp 0x4035dc