Function at 0x1000d1e0
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100679e5
mov eax, dword fs:[0]
push eax
sub esp, 0x440
mov eax, dword [0x1007a200]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x44c], eax
xor ebx, ebx
mov dword [ebp - 4], ebx
test byte [0x1007e218], 1
jne 0x1000d26c
or dword [0x1007e218], 1
mov byte [ebp - 4], 1
xor ecx, ecx
mov edi, 7
push ebx
mov eax, 0x1006dc30
mov esi, 0x1007e1fc
mov dword [0x1007e214], edi
mov dword [0x1007e210], ebx
mov word [0x1007e200], cx
call fcn.10002d50
push 0x10069a90
call fcn.10049252
add esp, 4
mov byte [ebp - 4], bl
jmp 0x1000d271
mov edi, 7
mov eax, 2
test byte [0x1007e218], al
jne 0x1000d2bc
or dword [0x1007e218], eax
mov byte [ebp - 4], al
xor edx, edx
push ebx
mov eax, 0x1006dc30
mov esi, 0x1007e1e0
mov dword [0x1007e1f8], edi
mov dword [0x1007e1f4], ebx
mov word [0x1007e1e4], dx
call fcn.10002d50
push 0x10069a50
call fcn.10049252
add esp, 4
mov byte [ebp - 4], bl
cmp dword [0x1007e210], ebx
jne 0x1000d305
mov ecx, 0x1007e1fc
call fcn.1001ea70
push 0xffffffffffffffff
push ebx
mov eax, 0x1007e1fc
mov ecx, 0x1007e1e0
call fcn.100024e0
push 0x1006deb0
mov eax, edi
mov edx, 0x1007e1e0
call fcn.100095e0
push 0x1006d824
mov eax, 1
mov edx, 0x1007e1e0
call fcn.100095e0
xor eax, eax
mov word [ebp - 0x428], ax
push ebx
mov eax, 0x1006dc30
lea esi, [ebp - 0x42c]
mov dword [ebp - 0x414], edi
mov dword [ebp - 0x418], ebx
call fcn.10002d50
mov byte [ebp - 4], 3
xor ecx, ecx
push 0xd
mov eax, str.__CurrentDir_
lea esi, [ebp - 0x448]
mov dword [ebp - 0x430], edi
mov dword [ebp - 0x434], ebx
mov word [ebp - 0x444], cx
call fcn.10002d50
mov edx, esi
push 0x1007e1fc
push edx
lea ebx, [ebp - 0x42c]
lea eax, [ebp + 8]
mov byte [ebp - 4], 4
call fcn.1001f5b0
mov edi, 8
add esp, 8
mov byte [ebp - 4], 3
cmp dword [ebp - 0x430], edi
jb 0x1000d393
mov eax, dword [ebp - 0x444]
push eax
call fcn.10047382
add esp, 4
push 0xffffffffffffffff
push 0
lea eax, [ebp - 0x42c]
lea ecx, [ebp + 8]
call fcn.100024e0
xor ecx, ecx
push 0xa
mov eax, str.__BevmDir_
lea esi, [ebp - 0x448]
mov dword [ebp - 0x430], 7
mov dword [ebp - 0x434], 0
mov word [ebp - 0x444], cx
call fcn.10002d50
mov edx, esi
push 0x1007e1e0
push edx
lea ebx, [ebp - 0x42c]
lea eax, [ebp + 8]
mov byte [ebp - 4], 5
call fcn.1001f5b0
add esp, 8
mov byte [ebp - 4], 3
cmp dword [ebp - 0x430], edi
jb 0x1000d40c
mov eax, dword [ebp - 0x444]
push eax
call fcn.10047382
add esp, 4
xor ecx, ecx
push 0x3fe
push ecx
lea edx, [ebp - 0x40e]
push edx
mov word [ebp - 0x410], cx
call fcn.10049f60
mov eax, dword [ebp - 0x428]
add esp, 0xc
cmp dword [ebp - 0x414], edi
jae 0x1000d43e
lea eax, [ebp - 0x428]
push 0x200
lea ecx, [ebp - 0x410]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x410]
lea edx, [eax + 2]
lea ebx, [ebx]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x1000d460
mov esi, dword [ebp - 0x44c]
sub eax, edx
sar eax, 1
push eax
lea eax, [ebp - 0x410]
call fcn.10002d50
cmp dword [ebp - 0x414], edi
jb 0x1000d498
mov edx, dword [ebp - 0x428]
push edx
call fcn.10047382
add esp, 4
xor eax, eax
mov dword [ebp - 0x414], 7
mov dword [ebp - 0x418], 0
mov word [ebp - 0x428], ax
cmp dword [ebp + 0x20], edi
jb 0x1000d4c6
mov ecx, dword [ebp + 0xc]
push ecx
call fcn.10047382
add esp, 4
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.1004738d
mov esp, ebp
pop ebp
ret