Function at 0x1000cfe0
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], 0x10013630
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 [0x1005ff58]
test eax, eax
jne 0x1000d02e
call sub.KERNEL32.dll_GetProcessHeap
test eax, eax
je 0x1000d5ca
mov dword [0x1005ff58], eax
push 0xa
push 0
push eax
call sub.KERNEL32.dll_HeapAlloc
test eax, eax
je 0x1000d5ca
lea esi, [0x10050ac1]
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 0x1000d09d
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 0x1000d0c0
mov dword [ebp - 0x28], 0
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d08f
jmp 0x1000d0ea
lea ecx, [0x10050ace]
cmp esi, ecx
je 0x1000d26c
movzx ebx, byte [esi]
lea ecx, [esi + 1]
movzx edi, bl
test bl, bl
js 0x1000d12e
mov esi, ecx
mov dword [ebp - 0x20], edi
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d08f
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.1002a230
add esp, 4
jmp 0x1000d080
and edi, 0x1f
mov dword [ebp - 0x20], edi
lea edi, [0x10050ace]
cmp ecx, edi
je 0x1000d163
movzx ecx, byte [esi + 1]
add esi, 2
and ecx, 0x3f
cmp bl, 0xdf
jbe 0x1000d195
lea edi, [0x10050ace]
cmp esi, edi
je 0x1000d1bf
movzx edi, byte [esi]
inc esi
mov dword [ebp - 0x24], esi
and edi, 0x3f
jmp 0x1000d1ca
xor ecx, ecx
lea esi, [0x10050ace]
cmp bl, 0xdf
mov edi, 0
mov dword [ebp - 0x24], esi
ja 0x1000d1ca
shl dword [ebp - 0x20], 6
lea esi, [0x10050ace]
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d08f
jmp 0x1000d0ea
mov ebx, dword [ebp - 0x20]
shl ebx, 6
or ebx, ecx
cmp ebx, 0xffff
ja 0x1000d230
mov dword [ebp - 0x20], ebx
xor ecx, ecx
cmp edx, dword [ebp - 0x448]
jne 0x1000d08f
jmp 0x1000d0ea
lea esi, [0x10050ace]
xor edi, edi
mov dword [ebp - 0x24], esi
shl ecx, 6
or ecx, edi
cmp bl, 0xf0
jb 0x1000d1ef
mov esi, dword [ebp - 0x24]
lea edi, [0x10050ace]
cmp esi, edi
je 0x1000d204
mov edi, esi
movzx esi, byte [esi]
inc edi
mov dword [ebp - 0x24], edi
and esi, 0x3f
jmp 0x1000d20f
mov ebx, dword [ebp - 0x20]
shl ebx, 0xc
or ebx, ecx
mov esi, dword [ebp - 0x24]
cmp ebx, 0xffff
ja 0x1000d230
jmp 0x1000d1a9
lea edi, [0x10050ace]
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 0x1000d1a9
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 0x1000d08f
jmp 0x1000d0ea
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 0x1000d2d4
mov ecx, edx
mov esi, eax
cmp word [esi], 0
je 0x1000d2f4
cmp word [esi + 2], 0
je 0x1000d2f4
cmp word [esi + 4], 0
je 0x1000d2f4
cmp word [esi + 6], 0
je 0x1000d2f4
cmp word [esi + 8], 0
je 0x1000d2f4
cmp word [esi + 0xa], 0
je 0x1000d2f4
cmp word [esi + 0xc], 0
je 0x1000d2f4
cmp word [esi + 0xe], 0
je 0x1000d2f4
add ecx, 0xfffffff8
add esi, 0x10
cmp ecx, 7
ja 0x1000d292
add ecx, ecx
nop word cs:[eax + eax]
test ecx, ecx
je 0x1000d380
add ecx, 0xfffffffe
cmp word [esi], 0
lea esi, [esi + 2]
jne 0x1000d2e0
mov ecx, dword [ebp - 0x40]
mov dword [ebp - 0x34], 0x100516d8
mov dword [ebp - 0x38], 0x1402
test ecx, ecx
je 0x1000d323
test eax, eax
je 0x1000d323
and ecx, 0x7fffffff
je 0x1000d323
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
cmp byte [ebp - 0x38], 3
jne 0x1000d4b9
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 0x1000d36d
mov eax, dword [eax]
cmp dword [ecx + 8], 9
jb 0x1000d35c
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
mov eax, dword [ebp - 0x34]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d4b9
cmp edx, dword [ebp - 0x40]
jne 0x1000d39f
mov dword [ebp - 0x10], 1
lea ecx, [ebp - 0x44]
push 1
call fcn.1002a230
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 0x1000d4b9
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x4c], eax
push 0x400
push 0
lea eax, [ebp - 0x44c]
push eax
call fcn.1001f1d0
add esp, 0xc
mov eax, dword [0x100508cc]
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 0x1000d422
jmp 0x1000d460
cmp edi, ebx
mov ebx, edi
jb 0x1000d4d6
cmp ebx, 0x201
jb 0x1000d460
mov ecx, dword [ebp - 0x34]
mov eax, ebx
sub eax, esi
sub ecx, esi
cmp ecx, eax
jae 0x1000d450
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x10], 5
lea ecx, [ebp - 0x38]
mov edx, esi
push eax
call fcn.1002a230
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 0x1000d46d
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 0x1000d493
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x1000d50b
cmp edi, ebx
jne 0x1000d410
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1000d410
add ebx, ebx
cmp ebx, 0x201
jb 0x1000d460
jmp 0x1000d422
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 0x1000d5db
mov edx, dword [ebp - 0x28]
lea ecx, [ebp - 0x44]
push edi
call fcn.10010970
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 0x1000d51e
jmp 0x1000d541
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 0x1000d541
cmp dword [ebp - 0x2c], 0
je 0x1000d541
and eax, 0x7fffffff
je 0x1000d541
push dword [ebp - 0x2c]
push 0
push dword [0x1005ff58]
mov dword [ebp - 0x28], ecx
call sub.KERNEL32.dll_HeapFree
mov ecx, dword [ebp - 0x28]
test bl, bl
je 0x1000d59d
mov eax, dword [ebp - 0x48]
cmp cl, 3
mov dword [eax], 0
jne 0x1000d5a8
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 0x1000d58d
mov eax, dword [esi]
cmp dword [ecx + 8], 9
jb 0x1000d57f
mov eax, dword [eax - 4]
push eax
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
push esi
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d5a8
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 0x1000d4c2
push dword [ebp - 0x20]
push 0
push dword [0x1005ff58]
call sub.KERNEL32.dll_HeapFree
jmp 0x1000d4c2
mov ecx, 0xa
mov edx, 2
call fcn.10029af0
ud2
mov ecx, edi
push 0x100516e0
call fcn.10029c70
add esp, 4
ud2