Function at 0x1001ecf
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1224
call fcn.01002fd0
push ebx
xor ebx, ebx
push esi
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
cmp dword [ebp + 0x10], ebx
mov dword [ebp - 0xc], eax
jne 0x1001f74
mov esi, dword [sym.imp.USER32.dll_LoadStringW]
push 0x400
lea eax, [ebp - 0xa24]
push eax
push 0xfa4
push dword [0x1004018]
call esi
push 0x104
lea eax, [ebp - 0x224]
push eax
push 0xfa1
push dword [0x1004018]
call esi
push 0x10
lea eax, [ebp - 0x224]
push eax
lea eax, [ebp - 0xa24]
push eax
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [0x100401c], 1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x57
pop esi
push esi
push 0x216
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
mov dword [ebp - 4], esi
push esi
jmp 0x1001fb1
push 0x1001330
push 0x1001314
push dword [ebp + 0x10]
call sub.SYSSETUP.dll_AsrAddSifEntryW
test eax, eax
jne 0x1001fbc
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
push eax
call esi
push eax
push 0x21e
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
call esi
mov dword [ebp - 4], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
jmp 0x100219d
push edi
mov edi, dword [sym.imp.KERNEL32.dll_HeapAlloc]
push 0x20a
push 8
pop esi
push esi
push dword [ebp - 0xc]
call edi
cmp eax, ebx
mov dword [ebp - 8], eax
jne 0x1001fea
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push 0x22a
jmp 0x1002075
mov ebx, 0x105
push ebx
push dword [ebp - 8]
push 0x10012e4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
cmp esi, ebx
jbe 0x100208c
push dword [ebp - 8]
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
lea eax, [esi + esi]
push eax
push 8
pop ebx
push ebx
push dword [ebp - 0xc]
mov dword [ebp - 0x10], esi
call edi
test eax, eax
mov dword [ebp - 8], eax
jne 0x1002051
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push ebx
push 0x243
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
mov dword [ebp - 4], ebx
push ebx
jmp 0x1002182
push esi
push eax
push 0x10012e4
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov esi, eax
cmp esi, dword [ebp - 0x10]
jbe 0x100208c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0xa
pop esi
push esi
push 0x253
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
mov dword [ebp - 4], esi
push esi
jmp 0x1002182
test esi, esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
jbe 0x10020c9
push dword [ebp - 8]
call fcn.01001c95
mov dword [ebp - 0x10], eax
call esi
mov edi, eax
test edi, edi
mov dword [ebp - 4], edi
je 0x10020cd
call esi
push eax
push edi
push 0x25c
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
push edi
jmp 0x1002182
and dword [ebp - 0x10], 0
mov edi, dword [ebp + 0xc]
xor ecx, ecx
cmp dword [ebp + 8], ecx
jbe 0x10020ef
mov ax, word [edi + ecx*2]
movzx edx, ax
xor dword [ebp - 0x18], edx
test ax, ax
jne 0x10020e9
inc dword [ebp - 0x14]
inc ecx
cmp ecx, dword [ebp + 8]
jb 0x10020d7
mov eax, dword [ebp - 0x14]
push edi
push dword [ebp - 0x18]
dec eax
push eax
push dword [ebp + 8]
xor eax, eax
cmp dword [ebp - 0x10], eax
setne al
push eax
lea eax, [ebp - 0x1224]
push 0x10012bc
push eax
call dword [sym.imp.msvcrt.dll_swprintf]
add esp, 0x1c
lea eax, [ebp - 0x1224]
push eax
mov ebx, 0x10011b8
push ebx
push dword [ebp + 0x10]
call sub.SYSSETUP.dll_AsrAddSifEntryW
test eax, eax
jne 0x100214d
call esi
push eax
call esi
push eax
push 0x280
jmp 0x100216c
push edi
push ebx
push dword [ebp + 0x10]
call sub.SYSSETUP.dll_AsrAddSifEntryW
test eax, eax
je 0x1002161
push edi
call dword [sym.imp.msvcrt.dll_wcslen]
lea edi, [edi + eax*2 + 2]
cmp word [edi], 0
pop ecx
jne 0x100213f
jmp 0x1002188
call esi
push eax
call esi
push eax
push 0x28d
push 0x1001250
call dword [sym.imp.msvcrt.dll_wprintf]
add esp, 0x10
call esi
mov dword [ebp - 4], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], 0
pop edi
je 0x100219d
push dword [ebp - 8]
push 0
push dword [ebp - 0xc]
call dword [sym.imp.KERNEL32.dll_HeapFree]
mov eax, dword [ebp - 4]
pop esi
pop ebx
leave
ret 0xc