Function at 0x40b000
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], 0x413270
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
mov esi, dword fs:[0]
mov dword [ebp - 0x18], esi
lea esi, [ebp - 0x460]
mov dword fs:[0], ecx
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], eax
mov ecx, esi
push eax
call fcn.00412090
add esp, 4
cmp dword [ebp - 0x460], 1
je 0x40b24b
mov ecx, dword [ebp - 0x45c]
mov edx, dword [ebp - 0x458]
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x5c], edx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x58], eax
push 0x400
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [0x45d3a4]
xor esi, esi
mov ebx, 0x200
mov dword [ebp - 0x34], eax
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x2c], 0
cmp ebx, 0x201
jae 0x40b0d2
jmp 0x40b110
cmp edi, ebx
mov ebx, edi
jb 0x40b169
cmp ebx, 0x201
jb 0x40b110
mov ecx, dword [ebp - 0x30]
mov eax, ebx
sub eax, esi
sub ecx, esi
cmp ecx, eax
jae 0x40b100
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x34]
mov edx, esi
push eax
call fcn.00459ad0
add esp, 4
mov eax, dword [ebp - 0x34]
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov edi, dword [ebp - 0x24]
mov esi, ebx
mov dword [ebp - 0x2c], ebx
mov dword [ebp - 0x20], ebx
jmp 0x40b11d
lea edi, [ebp - 0x460]
mov dword [ebp - 0x20], 0x200
mov dword [ebp - 0x28], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push edi
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x40b143
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x40b1a5
cmp edi, ebx
jne 0x40b0c0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x40b0c0
add ebx, ebx
cmp ebx, 0x201
jb 0x40b110
jmp 0x40b0d2
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], 0
cmp edi, eax
ja 0x40b2cb
lea eax, [ebp - 0x4c]
push edi
push dword [ebp - 0x28]
push eax
call fcn.0040cc90
add esp, 0xc
mov eax, dword [ebp - 0x48]
mov ecx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x4c]
xor ebx, ebx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], ecx
mov eax, dword [ebp - 0x30]
test eax, eax
jne 0x40b1b9
jmp 0x40b1d1
xor esi, esi
mov bl, 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40b1d1
cmp dword [ebp - 0x24], 0
je 0x40b1d1
add eax, eax
je 0x40b1d1
push 2
push eax
push dword [ebp - 0x24]
call fcn.00407d00
add esp, 0xc
xor edi, edi
test bl, bl
je 0x40b200
mov ebx, esi
mov esi, dword [ebp - 0x20]
test bl, bl
sete al
cmp esi, 0xcb
sete cl
xor edx, edx
and cl, al
mov eax, dword [ebp - 0x3c]
cmovne ebx, edx
xor cl, 1
movzx edi, cl
test eax, eax
jne 0x40b20c
jmp 0x40b224
mov ebx, esi
mov eax, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x20]
test eax, eax
je 0x40b224
cmp dword [ebp - 0x38], 0
je 0x40b224
add eax, eax
je 0x40b224
push 2
push eax
push dword [ebp - 0x38]
call fcn.00407d00
add esp, 0xc
test edi, edi
jne 0x40b25a
mov eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x18]
mov dword [eax], ebx
mov dword [eax + 4], esi
mov dword [eax + 8], ecx
mov dword fs:[0], edx
add esp, 0x454
pop esi
pop edi
pop ebx
pop ebp
ret
mov ebx, dword [ebp - 0x45c]
mov eax, dword [ebp - 0x458]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x460], 0x45d664
mov dword [ebp - 0x45c], 2
mov dword [ebp - 0x458], 0
mov dword [ebp - 0x10], 1
mov dword [ebp - 0x30], eax
lea eax, [ebp - 0x54]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x34]
mov dword [ebp - 0x48], 0x40e0a0
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x40], 0x40b6f0
mov dword [ebp - 0x450], eax
mov dword [ebp - 0x44c], 2
lea eax, [ebp - 0x460]
push 0x45d674
push eax
call fcn.00459e60
add esp, 8
jmp 0x40b2da
push 0x45e834
push eax
push edi
call fcn.00458700
add esp, 0xc
ud2