Function at 0x40b370
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x448
mov dword [ebp - 0x1c], esp
mov dword [ebp - 0x10], 0xffffffff
mov dword [ebp - 0x14], 0x41a350
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 - 0x454]
push eax
call fcn.00418ba0
add esp, 4
mov eax, dword [ebp - 0x454]
test eax, eax
mov dword [ebp - 0x34], eax
je 0x40b4c7
mov eax, dword [ebp - 0x450]
mov esi, 0x200
mov dword [ebp - 0x44], 2
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x30], 2
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x38], eax
cmp esi, 0x201
jae 0x40b430
jmp 0x40b41e
jbe 0x40b4db
cmp esi, 0x201
jae 0x40b430
mov dword [ebp - 0x24], 0x200
lea ebx, [ebp - 0x454]
mov edi, esi
jmp 0x40b46b
mov edi, dword [ebp - 0x28]
mov eax, dword [ebp - 0x20]
sub esi, edi
sub eax, edi
cmp eax, esi
jae 0x40b45c
mov dword [ebp - 0x10], 2
lea ecx, [ebp - 0x44]
mov edx, edi
push esi
call fcn.0042bba0
add esp, 4
mov eax, dword [ebp - 0x44]
mov edi, dword [ebp - 0x40]
mov dword [ebp - 0x30], eax
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x20], edi
mov dword [ebp - 0x24], edi
mov dword [ebp - 0x28], 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 0x40b492
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b5db
cmp esi, edi
jne 0x40b410
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40b5ff
lea esi, [edi + edi]
test edi, edi
mov eax, 0xffffffff
cmovs esi, eax
cmp esi, 0x201
jb 0x40b41e
jmp 0x40b430
lea ecx, [ebp - 0x454]
call fcn.00409360
mov byte [edi + 0xc], 2
jmp 0x40b5c5
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], 2
cmp esi, eax
ja 0x40b61c
lea eax, [ebp - 0x54]
push esi
push ebx
push eax
call fcn.0040e830
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 - 0x20], eax
movzx eax, byte [ebp - 0x45]
mov dword [ebp - 0x24], ecx
mov word [ebp - 0x2c], dx
mov byte [ebp - 0x2a], al
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp + 8]
test ecx, ecx
je 0x40b537
add ecx, ecx
push 2
push ecx
push dword [ebp - 0x30]
call fcn.004080a0
add esp, 0xc
cmp bl, 2
jne 0x40b58e
cmp byte [ebp - 0x20], 3
mov byte [edi + 0xc], 2
jne 0x40b5ae
mov ecx, dword [esi]
mov eax, dword [esi + 4]
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x24], ecx
push ecx
mov dword [ebp - 0x20], eax
call dword [eax]
add esp, 4
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx + 4]
test eax, eax
je 0x40b57a
push dword [ecx + 8]
push eax
push dword [ebp - 0x24]
call fcn.004080a0
add esp, 0xc
push 4
push 0xc
push dword [ebp - 0x28]
call fcn.004080a0
add esp, 0xc
mov edi, dword [ebp + 8]
jmp 0x40b5ae
movzx ecx, word [ebp - 0x2c]
movzx edx, byte [ebp - 0x2a]
mov eax, dword [ebp - 0x20]
mov word [edi + 0xd], cx
mov byte [edi + 0xf], dl
mov dword [edi], eax
mov eax, dword [ebp - 0x24]
mov dword [edi + 4], esi
mov dword [edi + 8], eax
mov byte [edi + 0xc], bl
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x40b5c5
add eax, eax
push 2
push eax
push dword [ebp - 0x34]
call fcn.004080a0
add esp, 0xc
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
mov eax, edi
add esp, 0x448
pop esi
pop edi
pop ebx
pop ebp
ret
mov dword [ebp - 0x20], 0
mov bl, 2
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, eax
mov ecx, dword [ebp - 0x28]
mov edi, dword [ebp + 8]
test ecx, ecx
jne 0x40b527
jmp 0x40b537
mov dword [ebp - 0x10], 2
push 0x42fcec
push 0x28
push str.internal_error:_entered_unreachable_code_rustc_5680fa18feaa87f3ff04063800aec256c3d4b4belibrary_alloc_src_vecmod.rs
call fcn.0042c800
add esp, 0xc
jmp 0x40b62b
push 0x42fcdc
push eax
push esi
call fcn.0042cbf0
add esp, 0xc
ud2