Function at 0x1000d380
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x440
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x100139d0
mov dword [ebp - 0x48], ecx
lea eax, [ebp - 0x18]
mov ecx, dword fs:[0]
mov dword [ebp - 0x18], ecx
mov dword fs:[0], eax
mov eax, dword [0x1005e128]
test eax, eax
jne 0x1000d3ce
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x1000d96a
mov dword [0x1005e128], eax
push 0xa
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x1000d96a
lea esi, [0x1004fac1]
mov edx, 1
xor ecx, ecx
mov word [eax], 0x52
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x448], 5
mov dword [ebp - 0x444], 1
mov dword [ebp - 0x28], 0
jmp 0x1000d43d
mov eax, dword [ebp - 0x44c]
mov edx, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp - 0x20]
mov word [eax + edx*2], di
inc edx
mov dword [ebp - 0x444], edx
test cx, cx
mov dword [ebp - 0x20], ecx
je 0x1000d460
mov dword [ebp - 0x28], 0
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d42f
jmp 0x1000d48a
lea ecx, [0x1004face]
cmp esi, ecx
je 0x1000d60c
movzx ebx, byte [esi]
lea ecx, [esi + 1]
movzx edi, bl
test bl, bl
js 0x1000d4ce
mov esi, ecx
mov dword [ebp - 0x20], edi
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d42f
mov eax, str.RUST_BACKTRACE
mov ecx, 0xffffffff
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x2c], edx
sub eax, esi
add eax, 0xe
add eax, 3
cmovb eax, ecx
lea ecx, [ebp - 0x44c]
shr eax, 2
cmp word [ebp - 0x28], 1
sbb eax, 0
add eax, 2
push eax
call fcn.10029a30
add esp, 4
jmp 0x1000d420
and edi, 0x1f
mov dword [ebp - 0x20], edi
lea edi, [0x1004face]
cmp ecx, edi
je 0x1000d503
movzx ecx, byte [esi + 1]
add esi, 2
and ecx, 0x3f
cmp bl, 0xdf
jbe 0x1000d535
lea edi, [0x1004face]
cmp esi, edi
je 0x1000d55f
movzx edi, byte [esi]
inc esi
mov dword [ebp - 0x24], esi
and edi, 0x3f
jmp 0x1000d56a
xor ecx, ecx
lea esi, [0x1004face]
cmp bl, 0xdf
mov edi, 0
mov dword [ebp - 0x24], esi
ja 0x1000d56a
shl dword [ebp - 0x20], 6
lea esi, [0x1004face]
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d42f
jmp 0x1000d48a
mov ebx, dword [ebp - 0x20]
shl ebx, 6
or ebx, ecx
cmp ebx, 0xffff
ja 0x1000d5d0
mov dword [ebp - 0x20], ebx
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d42f
jmp 0x1000d48a
lea esi, [0x1004face]
xor edi, edi
mov dword [ebp - 0x24], esi
shl ecx, 6
or ecx, edi
cmp bl, 0xf0
jb 0x1000d58f
mov esi, dword [ebp - 0x24]
lea edi, [0x1004face]
cmp esi, edi
je 0x1000d5a4
mov edi, esi
movzx esi, byte [esi]
inc edi
mov dword [ebp - 0x24], edi
and esi, 0x3f
jmp 0x1000d5af
mov ebx, dword [ebp - 0x20]
shl ebx, 0xc
or ebx, ecx
mov esi, dword [ebp - 0x24]
cmp ebx, 0xffff
ja 0x1000d5d0
jmp 0x1000d549
lea edi, [0x1004face]
xor esi, esi
mov dword [ebp - 0x24], edi
mov edi, dword [ebp - 0x20]
shl ecx, 6
and edi, 7
shl edi, 0x12
or ecx, edi
or ecx, esi
mov ebx, ecx
mov esi, dword [ebp - 0x24]
cmp ebx, 0xffff
jbe 0x1000d549
add ebx, 0xffff0000
mov dword [ebp - 0x24], esi
mov esi, ebx
and ebx, 0x3ff
shr esi, 0xa
or ebx, 0xdc00
or esi, 0xd800
mov dword [ebp - 0x20], esi
mov esi, dword [ebp - 0x24]
mov ecx, ebx
mov dword [ebp - 0x28], ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d42f
jmp 0x1000d48a
mov edx, dword [ebp - 0x444]
movsd xmm0, qword [ebp - 0x44c]
mov dword [ebp - 0x3c], edx
movsd qword [ebp - 0x44], xmm0
cmp edx, 8
mov ecx, edx
mov eax, dword [ebp - 0x44]
mov esi, eax
jb 0x1000d674
mov ecx, edx
mov esi, eax
cmp word [esi], 0
je 0x1000d694
cmp word [esi + 2], 0
je 0x1000d694
cmp word [esi + 4], 0
je 0x1000d694
cmp word [esi + 6], 0
je 0x1000d694
cmp word [esi + 8], 0
je 0x1000d694
cmp word [esi + 0xa], 0
je 0x1000d694
cmp word [esi + 0xc], 0
je 0x1000d694
cmp word [esi + 0xe], 0
je 0x1000d694
add ecx, 0xfffffff8
add esi, 0x10
cmp ecx, 7
ja 0x1000d632
add ecx, ecx
nop word cs:[eax + eax]
test ecx, ecx
je 0x1000d720
add ecx, 0xfffffffe
cmp word [esi], 0
lea esi, [esi + 2]
jne 0x1000d680
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x34], 0x100506d8
mov dword [ebp - 0x38], 0x1402
test ecx, ecx
je 0x1000d6c3
test eax, eax
je 0x1000d6c3
and ecx, 0x7fffffff
je 0x1000d6c3
push eax
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
cmp byte [ebp - 0x38], 3
jne 0x1000d859
mov ecx, dword [ebp - 0x34]
mov eax, dword [ecx]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x10], 2
push eax
call dword [ecx]
add esp, 4
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 4]
cmp dword [ecx + 4], 0
je 0x1000d70d
mov eax, dword [eax]
cmp dword [ecx + 8], 9
jb 0x1000d6fc
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp - 0x34]
push eax
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d859
cmp edx, dword [ebp - 0x40]
jne 0x1000d73f
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x44]
push 1
call fcn.10029a30
add esp, 4
mov eax, dword [ebp - 0x44]
mov edx, dword [ebp - 0x3c]
mov word [eax + edx*2], 0
movsd xmm0, qword [ebp - 0x44]
movsd qword [ebp - 0x38], xmm0
mov eax, dword [ebp - 0x38]
test eax, eax
mov dword [ebp - 0x20], eax
je 0x1000d859
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x4c], eax
push 0x400
push 0
lea eax, [ebp - 0x44c]
push eax
call fcn.1001e9d0
add esp, 0xc
mov eax, dword [0x1004f8cc]
mov ebx, 0x200
xor esi, esi
mov dword [ebp - 0x38], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x30], 0
cmp ebx, 0x201
jae 0x1000d7c2
jmp 0x1000d800
cmp edi, ebx
mov ebx, edi
jb 0x1000d876
cmp ebx, 0x201
jb 0x1000d800
mov ecx, dword [ebp - 0x34]
mov eax, ebx
sub eax, esi
sub ecx, esi
cmp ecx, eax
jae 0x1000d7f0
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], 5
lea ecx, [ebp - 0x38]
mov edx, esi
push eax
call fcn.10029a30
add esp, 4
mov eax, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x2c]
mov esi, ebx
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x24], ebx
jmp 0x1000d80d
lea edi, [ebp - 0x44c]
mov dword [ebp - 0x24], 0x200
mov dword [ebp - 0x28], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push edi
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x1000d833
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1000d8ab
cmp edi, ebx
jne 0x1000d7b0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1000d7b0
add ebx, ebx
cmp ebx, 0x201
jb 0x1000d800
jmp 0x1000d7c2
mov eax, dword [ebp - 0x48]
mov dword [eax], 0
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x440
pop esi
pop edi
pop ebx
pop ebp
ret
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x10], 5
cmp edi, edx
ja 0x1000d97b
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x44]
push edi
call fcn.10010d10
add esp, 4
mov ecx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov esi, dword [ebp - 0x3c]
xor ebx, ebx
mov eax, dword [ebp - 0x34]
test eax, eax
jne 0x1000d8be
jmp 0x1000d8e1
mov bl, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov edi, eax
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x1000d8e1
cmp dword [ebp - 0x2c], 0
je 0x1000d8e1
and eax, 0x7fffffff
je 0x1000d8e1
push dword [ebp - 0x2c]
push 0
push dword [0x1005e128]
mov dword [ebp - 0x28], ecx
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [ebp - 0x28]
test bl, bl
je 0x1000d93d
mov eax, dword [ebp - 0x48]
cmp cl, 3
mov dword [eax], 0
jne 0x1000d948
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x10], 4
push eax
mov dword [ebp - 0x28], edi
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x28]
mov ecx, dword [esi + 4]
cmp dword [ecx + 4], 0
je 0x1000d92d
mov eax, dword [esi]
cmp dword [ecx + 8], 9
jb 0x1000d91f
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
push esi
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d948
mov eax, dword [ebp - 0x48]
mov dword [eax], ecx
mov dword [eax + 4], edi
mov dword [eax + 8], esi
test dword [ebp - 0x4c], 0x7fffffff
je 0x1000d862
push dword [ebp - 0x20]
push 0
push dword [0x1005e128]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d862
mov ecx, 0xa
mov edx, 2
call fcn.100292f0
ud2
mov ecx, edi
push 0x100506e0
call fcn.10029470
add esp, 4
ud2