Function at 0x10003960
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x38
mov esi, dword [0x10005d20]
cmp esi, 0xffffffff
je 0x10003a10
dec esi
mov dword [ebp - 0x10], esi
js 0x100039d7
mov eax, dword [ebp + 8]
mov esi, dword [0x100090a8]
inc eax
xor edi, edi
mov dword [ebp - 0x14], eax
mov eax, dword [sym.imp.ucrtbase.dll_strcmp]
mov dword [ebp - 0x18], eax
jmp 0x100039a0
lea edi, [ebx + 1]
cmp edi, dword [ebp - 0x10]
jg 0x100039d7
mov eax, dword [ebp - 0x10]
lea ebx, [eax + edi]
sar ebx, 1
mov eax, ebx
shl eax, 4
lea ecx, [esi + eax]
lea eax, [esi + eax + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x1c], ecx
call eax
test eax, eax
je 0x10003a00
jns 0x10003998
lea eax, [ebx - 1]
mov dword [ebp - 0x10], eax
cmp edi, dword [ebp - 0x10]
jle 0x100039a0
mov edx, dword [ebp + 8]
mov al, byte [0x10005d24]
cmp byte [edx], 0
js 0x100039f0
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
mov eax, dword [ebp - 0x1c]
mov al, byte [eax]
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], str.WINEDEBUG
call dword [sym.imp.ucrtbase.dll_getenv]
mov dword [0x10005d20], 0
test eax, eax
je 0x100039d7
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll__strdup]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x10003b62
mov edi, dword [ebp - 0x2c]
lea esi, [esi]
mov dword [esp + 4], 0x2c
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strchr]
test eax, eax
je 0x10003b70
lea edx, [eax + 1]
mov byte [eax], 0
mov dword [ebp - 0x10], edx
mov dword [esp + 4], 0x100075b0
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strcspn]
mov ebx, eax
lea esi, [edi + eax]
mov dl, byte [esi]
test dl, dl
je 0x10003af8
cmp esi, edi
jbe 0x10003b98
mov eax, 5
mov ecx, str.fixme
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], edi
xor esi, esi
mov edi, ecx
mov byte [ebp - 0x1c], dl
cmp ebx, eax
jne 0x10003ac4
mov eax, dword [ebp - 0x14]
mov dword [esp + 8], ebx
mov dword [esp + 4], edi
mov dword [esp], eax
call sym._memcmp
test eax, eax
je 0x10003cb6
inc esi
cmp esi, 4
je 0x10003ae8
mov edi, dword [esi*4 + 0x10007648]
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
cmp ebx, eax
je 0x10003aa9
inc esi
cmp esi, 4
jne 0x10003aca
lea esi, [esi]
mov eax, dword [ebp - 0x10]
test eax, eax
je 0x10003b56
mov edi, dword [ebp - 0x10]
jmp 0x10003a48
mov dl, byte [edi]
cmp dl, 0x2d
je 0x10003b80
lea eax, [edx - 0x2b]
and eax, 0xfd
mov byte [ebp - 0x18], al
je 0x10003ba0
mov byte [ebp - 0x1c], 0xff
mov byte [ebp - 0x18], 0
test dl, dl
je 0x10003ae8
mov dword [esp + 4], 0x100075b3
mov dword [esp], edi
mov esi, dword [sym.imp.ucrtbase.dll_strcmp]
call esi
test eax, eax
jne 0x10003ba8
mov al, byte [ebp - 0x18]
mov dl, byte [0x10005d24]
xor eax, 0xffffffff
mov ecx, dword [ebp - 0x1c]
and eax, edx
or eax, ecx
mov byte [0x10005d24], al
mov eax, dword [ebp - 0x10]
test eax, eax
jne 0x10003aef
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov esi, dword [0x10005d20]
jmp 0x10003978
mov dword [ebp - 0x10], 0
jmp 0x10003a6a
mov byte [ebp - 0x18], 0xff
mov byte [ebp - 0x1c], 0
mov esi, edi
lea edi, [esi + 1]
mov dl, byte [esi + 1]
jmp 0x10003b1c
mov edi, esi
jmp 0x10003afa
mov esi, edi
mov byte [ebp - 0x1c], 0xff
jmp 0x10003b8a
mov dword [esp], edi
call dword [sym.imp.ucrtbase.dll_strlen]
mov dword [ebp - 0x34], eax
cmp eax, 0xe
ja 0x10003ae8
mov eax, dword [0x10005d20]
mov edx, dword [0x100090a8]
mov dword [ebp - 0x30], eax
dec eax
mov dword [ebp - 0x14], eax
js 0x10003d9e
xor eax, eax
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], esi
mov edi, eax
mov esi, edx
jmp 0x10003bf0
lea edi, [ebx + 1]
cmp edi, dword [ebp - 0x14]
jg 0x10003c3d
mov eax, dword [ebp - 0x14]
lea ebx, [eax + edi]
sar ebx, 1
mov eax, ebx
shl eax, 4
lea edx, [esi + eax]
lea eax, [esi + eax + 1]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x28], edx
call eax
test eax, eax
je 0x10003c24
jns 0x10003be8
lea eax, [ebx - 1]
mov dword [ebp - 0x14], eax
jmp 0x10003beb
mov edx, dword [ebp - 0x28]
mov al, byte [ebp - 0x18]
xor eax, 0xffffffff
mov esi, dword [ebp - 0x1c]
mov bl, byte [edx]
and eax, ebx
or eax, esi
mov byte [edx], al
jmp 0x10003ae8
mov eax, edi
mov dword [ebp - 0x14], edi
mov ebx, eax
mov edx, esi
mov edi, dword [ebp - 0x20]
mov esi, eax
shl ebx, 4
mov eax, dword [0x100090ac]
cmp dword [ebp - 0x30], eax
jge 0x10003d39
mov ecx, dword [ebp - 0x30]
add ebx, edx
cmp dword [ebp - 0x14], ecx
jl 0x10003d11
mov eax, dword [ebp - 0x34]
lea edx, [ebx + 1]
inc eax
mov esi, edi
cmp eax, 4
jae 0x10003cef
xor ecx, ecx
test al, 2
je 0x10003c89
mov cx, word [esi]
mov word [edx], cx
mov ecx, 2
test al, 1
je 0x10003c93
mov al, byte [esi + ecx]
mov byte [edx + ecx], al
mov al, byte [ebp - 0x18]
mov dl, byte [0x10005d24]
xor eax, 0xffffffff
mov ecx, dword [ebp - 0x1c]
and eax, edx
or eax, ecx
mov byte [ebx], al
mov eax, dword [ebp - 0x30]
inc eax
mov dword [0x10005d20], eax
jmp 0x10003ae8
mov ecx, esi
mov eax, 1
shl eax, cl
mov dl, byte [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
cmp dl, 0x2b
mov byte [ebp - 0x18], al
je 0x10003d90
sub edx, 0x2b
mov al, dl
and eax, 0xfd
mov byte [ebp - 0x1c], al
je 0x10003b8a
mov edi, esi
mov byte [ebp - 0x1c], 0
jmp 0x10003b20
test dl, 1
jne 0x10003de5
test dl, 2
jne 0x10003dd0
mov ecx, eax
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov edx, edi
jmp 0x10003c78
mov eax, ecx
mov ecx, dword [ebp - 0x14]
sub eax, ecx
mov dword [esp + 4], ebx
shl eax, 4
mov dword [esp + 8], eax
lea eax, [esi + 1]
shl eax, 4
add edx, eax
mov dword [esp], edx
call dword [sym.imp.ucrtbase.dll_memmove]
jmp 0x10003c6a
add eax, eax
cmp eax, 0x10
jge 0x10003d45
mov eax, 0x10
mov dword [0x100090ac], eax
shl eax, 4
mov ecx, eax
mov eax, dword fs:[0x18]
test edx, edx
je 0x10003dae
mov dword [esp + 8], edx
mov dword [esp + 0xc], ecx
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_HeapReAlloc]
sub esp, 0x10
mov edx, eax
mov eax, dword [0x10005d20]
mov dword [0x100090a8], edx
mov dword [ebp - 0x30], eax
jmp 0x10003c5c
mov edi, esi
mov byte [ebp - 0x1c], al
mov byte [ebp - 0x18], 0
jmp 0x10003b88
xor ebx, ebx
xor esi, esi
mov dword [ebp - 0x14], 0
jmp 0x10003c4e
mov dword [esp + 8], ecx
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 edx, eax
jmp 0x10003d7d
mov cx, word [esi]
add edx, 2
mov word [edx - 2], cx
add esi, 2
sub eax, 2
jmp 0x10003d01
mov al, byte [edi]
lea edx, [ebx + 2]
mov byte [ebx + 1], al
inc esi
mov eax, dword [ebp - 0x34]
jmp 0x10003cf8