Function at 0x1015f320
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x454
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x1016fa80
mov edi, dword [ebp + 8]
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
mov esi, dword fs:[0]
mov dword [ebp - 0x18], esi
mov dword fs:[0], ecx
lea ecx, [ebp - 0x460]
push eax
call fcn.1016d8a0
add esp, 4
mov ecx, dword [ebp - 0x460]
test ecx, ecx
je 0x1015f487
mov edx, dword [ebp - 0x45c]
mov eax, dword [ebp - 0x458]
mov esi, 0x200
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x40], 2
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x24], 0
mov dword [ebp - 0x58], eax
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x5c], edx
cmp esi, 0x201
jae 0x1015f3f0
jmp 0x1015f3de
jbe 0x1015f4df
cmp esi, 0x201
jae 0x1015f3f0
lea ebx, [ebp - 0x460]
mov dword [ebp - 0x2c], 0x200
mov edi, esi
jmp 0x1015f42b
mov edi, dword [ebp - 0x20]
mov eax, dword [ebp - 0x24]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x1015f41c
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x40]
mov edx, edi
push esi
call fcn.101ae010
add esp, 4
mov eax, dword [ebp - 0x40]
mov edi, dword [ebp - 0x3c]
mov dword [ebp - 0x30], eax
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x2c], edi
mov dword [ebp - 0x20], edi
push 0
call dword [sym.imp.kernel32.dll_SetLastError]
push edi
push ebx
push dword [ebp - 0x34]
call dword [sym.imp.kernel32.dll_GetEnvironmentVariableW]
mov esi, eax
test eax, eax
jne 0x1015f452
call dword [sym.imp.kernel32.dll_GetLastError]
test eax, eax
jne 0x1015f5dd
cmp esi, edi
jne 0x1015f3d0
call dword [sym.imp.kernel32.dll_GetLastError]
cmp eax, 0x7a
jne 0x1015f601
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x1015f3de
jmp 0x1015f3f0
cmp byte [ebp - 0x45c], 3
jne 0x1015f4d6
mov ecx, dword [ebp - 0x458]
mov eax, dword [ecx]
mov dword [ebp - 0x20], ecx
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x10], 0
push eax
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x20]
mov ecx, dword [esi + 4]
mov eax, dword [ecx + 4]
test eax, eax
je 0x1015f4c6
push dword [ecx + 8]
push eax
push dword [esi]
call fcn.100985c0
add esp, 0xc
push 4
push 0xc
push esi
call fcn.100985c0
add esp, 0xc
mov edi, dword [ebp + 8]
mov byte [edi + 0xc], 2
jmp 0x1015f5c7
mov eax, dword [ebp - 0x2c]
mov dword [ebp - 0x10], 3
cmp esi, eax
ja 0x1015f61e
lea eax, [ebp - 0x54]
push esi
push ebx
push eax
call fcn.10162180
add esp, 0xc
mov eax, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x4c]
movzx edx, word [ebp - 0x47]
mov esi, dword [ebp - 0x50]
movzx ebx, byte [ebp - 0x48]
mov dword [ebp - 0x24], eax
movzx eax, byte [ebp - 0x45]
mov dword [ebp - 0x2c], ecx
mov word [ebp - 0x28], dx
mov byte [ebp - 0x26], al
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
test ecx, ecx
je 0x1015f53b
add ecx, ecx
push 2
push ecx
push dword [ebp - 0x30]
call fcn.100985c0
add esp, 0xc
cmp bl, 2
jne 0x1015f590
cmp byte [ebp - 0x24], 3
mov byte [edi + 0xc], 2
jne 0x1015f5b0
mov edx, dword [esi]
mov ecx, dword [esi + 4]
mov dword [ebp - 0x10], 2
push edx
mov dword [ebp - 0x20], esi
call dword [ecx]
add esp, 4
mov edx, dword [ebp - 0x20]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 4]
test eax, eax
je 0x1015f57e
push dword [ecx + 8]
push eax
push dword [edx]
mov esi, edx
call fcn.100985c0
mov edx, esi
add esp, 0xc
push 4
push 0xc
push edx
call fcn.100985c0
add esp, 0xc
mov edi, dword [ebp + 8]
jmp 0x1015f5b0
movzx ecx, word [ebp - 0x28]
movzx edx, byte [ebp - 0x26]
mov eax, dword [ebp - 0x24]
mov word [edi + 0xd], cx
mov byte [edi + 0xf], dl
mov dword [edi], eax
mov eax, dword [ebp - 0x2c]
mov dword [edi + 4], esi
mov dword [edi + 8], eax
mov byte [edi + 0xc], bl
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x1015f5c7
add eax, eax
push 2
push eax
push dword [ebp - 0x34]
call fcn.100985c0
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x454
pop esi
pop edi
pop ebx
pop ebp
ret
mov bl, 2
mov dword [ebp - 0x24], 0
call dword [sym.imp.kernel32.dll_GetLastError]
mov esi, eax
mov ecx, dword [ebp - 0x20]
mov edi, dword [ebp + 8]
test ecx, ecx
jne 0x1015f52b
jmp 0x1015f53b
mov dword [ebp - 0x10], 3
push 0x1023c6d8
push 0x28
push str.internal_error:_entered_unreachable_codeassertion_failed:_self.is_char_boundary_new_len__rustc_2a8221dbdfd180a2d56d4b0089f4f3952d8c2bcdlibrary_alloc_src_string.rs
call fcn.101af1e0
add esp, 0xc
jmp 0x1015f62d
push 0x1023c6e8
push eax
push esi
call fcn.101af5d0
add esp, 0xc
ud2