Function at 0x403a70
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, 0x68
mov esi, dword [0x405018]
mov eax, dword [ecx]
cmp esi, 0xffffffff
mov dword [ebp - 0x28], eax
je 0x403b50
sub esi, 1
js 0x403b00
mov eax, dword [0x4070a8]
xor edi, edi
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x28]
add eax, 1
mov dword [ebp - 0x24], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
mov dword [ebp - 0x38], eax
jmp 0x403ac7
lea edi, [edx + 1]
cmp edi, esi
jg 0x403b00
lea eax, [esi + edi]
mov edx, eax
shr edx, 0x1f
add edx, eax
sar edx, 1
mov ebx, edx
mov dword [ebp - 0x1c], edx
shl ebx, 4
add ebx, dword [ebp - 0x20]
lea eax, [ebx + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
mov eax, dword [ebp - 0x38]
call eax
test eax, eax
mov edx, dword [ebp - 0x1c]
je 0x403b20
jns 0x403ac0
lea esi, [edx - 1]
cmp edi, esi
jle 0x403ac7
mov eax, dword [ebp - 0x28]
cmp byte [eax], 0
js 0x403b30
movzx eax, byte [0x40501c]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx eax, byte [ebx]
lea esp, [ebp - 0x10]
pop ecx
pop ebx
pop esi
pop edi
pop ebp
lea esp, [ecx - 4]
ret
movzx eax, byte [0x40501c]
mov ecx, dword [ebp - 0x28]
mov byte [ecx], al
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 [0x405018], 0
je 0x403b00
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__strdup]
test eax, eax
mov dword [ebp - 0x54], eax
mov edi, eax
je 0x403c7f
mov dword [esp + 4], 0x2c
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
je 0x403cf0
lea ecx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x24], ecx
mov dword [esp + 4], 0x406668
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strcspn]
mov esi, eax
lea eax, [edi + eax]
mov ecx, eax
mov dword [ebp - 0x1c], eax
movzx eax, byte [eax]
test al, al
mov byte [ebp - 0x20], al
je 0x403c90
cmp ecx, edi
jbe 0x403c99
mov eax, 5
mov edx, str.fixme
xor ebx, ebx
cmp esi, eax
mov dword [ebp - 0x38], edi
mov edi, edx
je 0x403c0c
lea esi, [esi]
add ebx, 1
cmp ebx, 4
je 0x403c68
mov edi, dword [ebx*4 + 0x4066ec]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
cmp esi, eax
jne 0x403bf0
mov eax, dword [ebp - 0x38]
mov dword [esp + 8], esi
mov dword [esp + 4], edi
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memcmp]
test eax, eax
jne 0x403bf0
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp byte [ebp - 0x20], 0x2b
je 0x403ecc
movzx esi, byte [ebp - 0x20]
mov dword [ebp - 0x48], eax
mov byte [ebp - 0x38], 0
sub esi, 0x2b
and esi, 0xfd
jne 0x403cb6
lea esi, [esi]
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ecx + 1]
mov byte [ebp - 0x20], al
mov eax, ecx
add eax, 1
cmp byte [ebp - 0x20], 0
mov dword [ebp - 0x1c], eax
jne 0x403cb6
mov edi, dword [ebp - 0x24]
test edi, edi
jne 0x403b81
mov eax, dword [ebp - 0x54]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [0x405018]
jmp 0x403a98
movzx eax, byte [edi]
mov dword [ebp - 0x1c], edi
mov byte [ebp - 0x20], al
movzx eax, byte [ebp - 0x20]
cmp al, 0x2d
je 0x403d00
sub eax, 0x2b
mov byte [ebp - 0x38], 0xff
mov byte [ebp - 0x48], 0
test al, 0xfd
je 0x403c50
cmp byte [ebp - 0x20], 0
je 0x403c68
mov esi, dword [ebp - 0x1c]
mov edi, 0x40666b
mov ecx, 4
repe cmpsb byte [esi], byte es:[edi]
jne 0x403d10
movzx eax, byte [ebp - 0x48]
mov edi, dword [ebp - 0x24]
not eax
and al, byte [0x40501c]
or al, byte [ebp - 0x38]
test edi, edi
mov byte [0x40501c], al
jne 0x403b81
jmp 0x403c73
mov dword [ebp - 0x24], 0
jmp 0x403ba3
mov byte [ebp - 0x48], 0xff
mov byte [ebp - 0x38], 0
jmp 0x403c50
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_strlen]
cmp eax, 0xe
mov dword [ebp - 0x5c], eax
ja 0x403c68
mov ecx, dword [0x4070a8]
mov eax, dword [0x405018]
xor esi, esi
mov dword [ebp - 0x4c], ecx
mov ecx, dword [sym.imp.ucrtbase.dll_strcmp]
mov edx, eax
sub edx, 1
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x50], ecx
js 0x403ed8
mov ecx, esi
mov esi, edx
jmp 0x403d5c
lea ecx, [edi + 1]
cmp esi, ecx
jl 0x403d93
lea eax, [esi + ecx]
mov dword [ebp - 0x20], ecx
mov edi, eax
shr edi, 0x1f
add edi, eax
sar edi, 1
mov ebx, edi
shl ebx, 4
add ebx, dword [ebp - 0x4c]
lea eax, [ebx + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp], eax
mov eax, dword [ebp - 0x50]
call eax
test eax, eax
mov ecx, dword [ebp - 0x20]
je 0x403df9
jns 0x403d55
lea esi, [edi - 1]
jmp 0x403d58
mov ebx, ecx
mov esi, ecx
mov edi, ecx
shl ebx, 4
mov eax, dword [0x4070ac]
cmp dword [ebp - 0x58], eax
jge 0x403e6e
cmp esi, dword [ebp - 0x58]
jl 0x403e43
add ebx, dword [ebp - 0x4c]
mov eax, dword [ebp - 0x5c]
lea edx, [ebx + 1]
add eax, 1
cmp eax, 4
jae 0x403e0b
test eax, eax
je 0x403dd8
mov ecx, dword [ebp - 0x1c]
test al, 2
movzx ecx, byte [ecx]
mov byte [edx], cl
jne 0x403ee1
movzx eax, byte [ebp - 0x48]
not eax
and al, byte [0x40501c]
or al, byte [ebp - 0x38]
mov byte [ebx], al
mov eax, dword [ebp - 0x58]
add eax, 1
mov dword [0x405018], eax
jmp 0x403c68
movzx eax, byte [ebp - 0x48]
not eax
and al, byte [ebx]
or al, byte [ebp - 0x38]
mov byte [ebx], al
jmp 0x403c68
mov esi, dword [ebp - 0x1c]
mov ecx, dword [esi]
mov dword [ebx + 1], ecx
mov ecx, dword [esi + eax - 4]
mov dword [edx + eax - 4], ecx
lea ecx, [ebx + 5]
and ecx, 0xfffffffc
sub edx, ecx
sub esi, edx
add edx, eax
and edx, 0xfffffffc
cmp edx, 4
jb 0x403dd8
and edx, 0xfffffffc
xor eax, eax
mov edi, dword [esi + eax]
mov dword [ecx + eax], edi
add eax, 4
cmp eax, edx
jb 0x403e34
jmp 0x403dd8
mov eax, dword [ebp - 0x58]
mov ecx, dword [ebp - 0x4c]
sub eax, esi
add ebx, ecx
shl eax, 4
mov dword [esp + 4], ebx
mov dword [esp + 8], eax
lea eax, [edi + 1]
shl eax, 4
add eax, ecx
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x403db6
add eax, eax
mov ecx, dword [ebp - 0x4c]
mov edx, 0x10
cmp eax, 0x10
cmovl eax, edx
mov dword [0x4070ac], eax
shl eax, 4
mov edx, dword fs:[0x18]
test ecx, ecx
je 0x403ef3
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x4c]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapReAlloc]
sub esp, 0x10
mov ecx, dword [0x405018]
mov dword [0x4070a8], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x58], ecx
jmp 0x403daa
mov dword [ebp - 0x38], eax
mov byte [ebp - 0x48], 0
jmp 0x403c50
xor ebx, ebx
xor edi, edi
jmp 0x403d9c
mov ecx, dword [ebp - 0x1c]
movzx ecx, word [ecx + eax - 2]
mov word [edx + eax - 2], cx
jmp 0x403dd8
mov dword [esp + 8], eax
mov dword [esp + 4], 0
mov eax, dword [edx + 0x30]
mov eax, dword [eax + 0x18]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_HeapAlloc]
sub esp, 0xc
jmp 0x403eb6