Function at 0x414260
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], 0x4223f0
mov eax, dword [ebp + 8]
mov edi, ecx
lea ecx, [ebp - 0x18]
mov esi, dword fs:[0]
mov dword [ebp - 0x18], esi
lea esi, [ebp - 0x44c]
mov dword fs:[0], ecx
mov ecx, esi
push eax
call fcn.004145c0
add esp, 4
cmp dword [ebp - 0x44c], 0
je 0x414305
cmp byte [ebp - 0x448], 3
jne 0x414417
mov ecx, dword [ebp - 0x444]
mov dword [ebp - 0x28], edi
mov eax, dword [ecx]
mov dword [ebp - 0x24], ecx
mov ecx, dword [ecx + 4]
mov dword [ebp - 0x10], 0
push eax
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x24]
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x4142f1
mov ecx, dword [esi]
mov edx, dword [eax + 8]
call fcn.00404a30
mov ecx, esi
mov edx, 4
call fcn.00404a30
mov edi, dword [ebp - 0x28]
jmp 0x414417
mov eax, dword [ebp - 0x448]
test eax, eax
mov dword [ebp - 0x24], eax
je 0x414417
mov eax, dword [ebp - 0x444]
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x40], eax
push 0x400
push 0
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ebx, 0x200
mov dword [ebp - 0x3c], 2
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x2c], 2
cmp ebx, 0x201
jae 0x414380
jmp 0x4143c0
mov ebx, edi
jbe 0x414431
cmp ebx, 0x201
jb 0x4143c0
mov edx, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x38]
mov eax, ebx
sub eax, edx
sub ecx, edx
cmp ecx, eax
jae 0x4143af
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x10], 3
lea ecx, [ebp - 0x3c]
push eax
call fcn.004237c0
add esp, 4
mov eax, dword [ebp - 0x3c]
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x2c], eax
mov edi, dword [ebp - 0x2c]
mov esi, ebx
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x20], ebx
jmp 0x4143cb
lea edi, [ebp - 0x44c]
mov esi, 0x200
mov dword [ebp - 0x30], edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
push edi
push dword [ebp - 0x24]
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test eax, eax
jne 0x4143f1
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x41445c
cmp edi, ebx
jne 0x414370
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x414507
add ebx, ebx
cmp ebx, 0x201
jb 0x4143c0
jmp 0x414380
mov dword [edi], 0
mov eax, dword [ebp - 0x18]
mov dword fs:[0], eax
add esp, 0x440
pop esi
pop edi
pop ebx
pop ebp
ret
cmp edi, esi
mov dword [ebp - 0x10], 3
ja 0x414527
mov edx, dword [ebp - 0x30]
lea ecx, [ebp - 0x4c]
push edi
call fcn.00412c90
add esp, 4
mov ecx, dword [ebp - 0x4c]
mov edi, dword [ebp - 0x48]
mov esi, dword [ebp - 0x44]
mov bl, 1
jmp 0x414468
call dword [sym.imp.KERNEL32.dll_GetLastError]
xor ecx, ecx
mov edi, eax
xor ebx, ebx
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x41448c
cmp dword [ebp - 0x2c], 0
je 0x41448c
add eax, eax
je 0x41448c
mov dword [ebp - 0x20], ecx
mov ecx, dword [ebp - 0x2c]
mov edx, 2
call fcn.00404a30
mov ecx, dword [ebp - 0x20]
test bl, bl
je 0x41449d
mov eax, dword [ebp - 0x28]
mov dword [eax + 4], edi
mov dword [eax], ecx
mov dword [eax + 8], esi
jmp 0x4144e2
mov eax, dword [ebp - 0x28]
cmp cl, 3
mov dword [eax], 0
jne 0x4144e2
mov eax, dword [edi]
mov ecx, dword [edi + 4]
mov dword [ebp - 0x10], 2
push eax
mov dword [ebp - 0x20], edi
call dword [ecx]
add esp, 4
mov esi, dword [ebp - 0x20]
mov eax, dword [esi + 4]
cmp dword [eax + 4], 0
je 0x4144d6
mov ecx, dword [esi]
mov edx, dword [eax + 8]
call fcn.00404a30
mov ecx, esi
mov edx, 4
call fcn.00404a30
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x41441d
add eax, eax
je 0x41441d
mov ecx, dword [ebp - 0x24]
mov edx, 2
call fcn.00404a30
jmp 0x41441d
mov dword [ebp - 0x10], 3
mov ecx, str.internal_error:_entered_unreachable_code
mov edx, 0x28
push 0x4275b0
call fcn.00423500
add esp, 4
jmp 0x414530
mov ecx, edi
mov edx, esi
call fcn.004234f0
ud2