Function at 0x4082c0
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], 0x417260
mov eax, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
lea ecx, [ebp - 0x18]
lea edi, [ebp - 0x460]
mov esi, dword fs:[0]
mov dword [ebp - 0x18], esi
mov dword fs:[0], ecx
mov ecx, edi
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x50], eax
push eax
call fcn.00415e70
add esp, 4
mov ecx, dword [ebp - 0x45c]
mov esi, dword [ebp - 0x458]
cmp dword [ebp - 0x460], 1
je 0x408508
mov eax, dword [ebp - 0x454]
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x60], ecx
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x3c], esi
mov dword [ebp - 0x58], eax
push 0x400
push 0
push edi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov eax, dword [0x424d9c]
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 0x408392
jmp 0x4083d0
cmp edi, ebx
mov ebx, edi
jb 0x408425
cmp ebx, 0x201
jb 0x4083d0
mov ecx, dword [ebp - 0x30]
mov eax, ebx
sub eax, esi
sub ecx, esi
cmp ecx, eax
jae 0x4083c0
mov dword [ebp - 0x20], ebx
mov dword [ebp - 0x10], 0
lea ecx, [ebp - 0x34]
mov edx, esi
push eax
call fcn.004228a0
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 0x4083dd
lea edi, [ebp - 0x460]
mov dword [ebp - 0x20], 0x200
mov dword [ebp - 0x28], edi
push 0
call sub.KERNEL32.dll_SetLastError
push ebx
push edi
push dword [ebp - 0x38]
call sub.KERNEL32.dll_GetEnvironmentVariableW
mov edi, eax
test eax, eax
jne 0x408400
call sub.KERNEL32.dll_GetLastError
test eax, eax
jne 0x408461
cmp edi, ebx
jne 0x408380
call sub.KERNEL32.dll_GetLastError
cmp eax, 0x7a
jne 0x408380
add ebx, ebx
cmp ebx, 0x201
jb 0x4083d0
jmp 0x408392
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x10], 0
cmp eax, edi
jb 0x408580
lea eax, [ebp - 0x4c]
push edi
push dword [ebp - 0x28]
push eax
call fcn.004111f0
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 0x408474
jmp 0x40848c
xor esi, esi
mov bl, 1
call sub.KERNEL32.dll_GetLastError
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x40848c
cmp dword [ebp - 0x24], 0
je 0x40848c
add eax, eax
je 0x40848c
push 2
push eax
push dword [ebp - 0x24]
call fcn.004036f0
add esp, 0xc
xor edi, edi
test bl, bl
je 0x4084be
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 - 0x38]
cmovne ebx, edx
xor cl, 1
movzx edi, cl
mov ecx, dword [ebp - 0x3c]
test ecx, ecx
jne 0x4084cd
jmp 0x4084e1
mov ebx, esi
mov eax, dword [ebp - 0x38]
mov ecx, dword [ebp - 0x3c]
mov esi, dword [ebp - 0x20]
test ecx, ecx
je 0x4084e1
test eax, eax
je 0x4084e1
add ecx, ecx
je 0x4084e1
push 2
push ecx
push eax
call fcn.004036f0
add esp, 0xc
test edi, edi
jne 0x40850d
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 dword [ebp - 0x20], esi
jmp 0x40850f
mov ecx, ebx
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0x34], ecx
mov dword [ebp - 0x460], 0x425138
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], 0x40cb40
mov dword [ebp - 0x44], eax
lea eax, [ebp - 0x4c]
mov dword [ebp - 0x40], 0x409f80
mov dword [ebp - 0x450], eax
mov dword [ebp - 0x44c], 2
lea eax, [ebp - 0x460]
push 0x425148
push eax
call fcn.00422d90
add esp, 8
jmp 0x40858f
push 0x426370
push eax
push edi
call fcn.004230d0
add esp, 0xc
ud2