Function at 0x65ab10
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x695a92
mov eax, dword fs:[0]
push eax
sub esp, 0x1ac
mov eax, dword [0x6ade70]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, edx
mov dword [ebp - 0x14c], ebx
mov eax, ecx
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x148], eax
mov ecx, dword [ebx + 4]
xor edi, edi
mov dword [ebp - 0x164], 0
mov dword [ebp - 0x144], edi
test ecx, ecx
je 0x65abaa
mov eax, dword [ebx + 0xc]
push edi
push edi
inc eax
push eax
push ecx
push edi
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar_1]
mov esi, eax
lea eax, [esi + esi]
call fcn.0067f670
mov eax, dword [ebx + 0xc]
mov edi, esp
mov dword [ebp - 0x144], esp
inc eax
push esi
push edi
push eax
push dword [ebx + 4]
push 0
push 0xfde9
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar_1]
push 0x208
mov ebx, 0x104
call fcn.00684588
add esp, 4
mov esi, eax
push ebx
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
je 0x65ac23
nop dword [eax]
cmp ebx, edi
jae 0x65ae62
lea eax, [edi + edi]
add ebx, ebx
cmp ebx, eax
je 0x65ac0d
test ebx, ebx
jne 0x65abf0
push eax
call fcn.00684588
add esp, 4
jmp 0x65ac0b
test eax, eax
jne 0x65ac01
push esi
call fcn.00684583
add esp, 4
xor esi, esi
jmp 0x65ac0d
push eax
push esi
call fcn.00684593
add esp, 8
mov esi, eax
push edi
push esi
push dword [ebp - 0x144]
mov ebx, edi
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov edi, eax
test edi, edi
jne 0x65abd0
call dword [sym.imp.KERNEL32.dll_GetLastError_1]
mov edi, eax
cmp edi, 0xcb
je 0x65ae53
test edi, edi
je 0x65ae53
push 0x6a920c
lea ecx, [ebp - 0x160]
mov dword [ebp - 0x160], 0x6a48b8
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x158], 0
mov dword [ebp - 0x154], 0
call fcn.00660810
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x148]
mov word [ebp - 0x144], 0x436d
movzx eax, word [ebp - 0x144]
mov word [ebp - 0x148], ax
mov word [ebp - 0x144], 0x4346
movzx eax, word [ebp - 0x144]
mov word [ebp - 0x146], ax
lea eax, [ebp - 0x58]
push eax
call fcn.0065af20
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push eax
push ecx
lea ecx, [ebp - 0x140]
call fcn.0065afe0
mov ecx, eax
call fcn.0065af70
push edi
lea ecx, [ebp - 0x1b4]
call fcn.006606c0
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 3
push eax
push ecx
lea ecx, [ebp - 0x80]
call fcn.0065b040
mov ecx, eax
call fcn.00651eb0
lea eax, [ebp - 0x70]
mov byte [ebp - 4], 4
push eax
push ecx
lea ecx, [ebp - 0xd8]
call fcn.0065aeb0
mov ecx, eax
call fcn.00653860
mov dword [ebp - 0x148], eax
lea eax, [ebp - 0x58]
push eax
lea ecx, [ebp - 0x1a4]
call fcn.0064eb90
mov ebx, eax
lea eax, [ebp - 0x40]
push eax
lea ecx, [ebp - 0x194]
call fcn.0064eb90
mov edi, eax
lea eax, [ebp - 0x28]
push eax
lea ecx, [ebp - 0x184]
call fcn.0064eb90
lea ecx, [ebp - 0x160]
push ecx
push ebx
push dword [ebp - 0x14c]
lea ecx, [ebp - 0x1b4]
push edi
push ecx
push eax
lea ecx, [ebp - 0x174]
call fcn.006603b0
mov ecx, eax
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0x148]
cmp dword [eax + 0x14], 0x10
jb 0x65ad82
mov eax, dword [eax]
push ecx
push 0
push 0x4ea
push eax
push dword [ecx + 4]
mov ecx, dword [0x6b04b4]
call fcn.0066fda0
mov eax, dword [ebp - 0x170]
mov dword [ebp - 0x174], 0x6a48b8
test eax, eax
je 0x65adb6
push eax
call fcn.00684583
add esp, 4
mov eax, dword [ebp - 0x180]
mov dword [ebp - 0x184], 0x6a48b8
test eax, eax
je 0x65add3
push eax
call fcn.00684583
add esp, 4
mov eax, dword [ebp - 0x190]
mov dword [ebp - 0x194], 0x6a48b8
test eax, eax
je 0x65adf0
push eax
call fcn.00684583
add esp, 4
mov eax, dword [ebp - 0x1a0]
mov dword [ebp - 0x1a4], 0x6a48b8
test eax, eax
je 0x65ae0d
push eax
call fcn.00684583
add esp, 4
lea ecx, [ebp - 0x70]
call fcn.00650140
lea ecx, [ebp - 0x28]
call fcn.00650140
mov eax, dword [ebp - 0x1b0]
test eax, eax
je 0x65ae30
push eax
call fcn.00684583
add esp, 4
lea ecx, [ebp - 0x40]
call fcn.00650140
lea ecx, [ebp - 0x58]
call fcn.00650140
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x65ae53
push eax
call fcn.00684583
add esp, 4
test esi, esi
je 0x65ae60
push esi
call fcn.00684583
add esp, 4
xor esi, esi
mov edi, dword [ebp - 0x150]
mov ecx, edi
push esi
call fcn.00660750
test esi, esi
je 0x65ae7d
push esi
call fcn.00684583
add esp, 4
mov eax, edi
lea esp, [ebp - 0x1c8]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0067efea
mov esp, ebp
pop ebp
ret