Function at 0x1002c658
Capabilities:
Query environment variable

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x38
mov eax, dword [0x10086084]
xor eax, ebp
mov dword [ebp - 8], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
push 0x28
mov edi, ecx
mov dword [ebp - 0x30], edx
push 8
mov dword [ebp - 0x34], edi
xor esi, esi
mov dword [ebp - 0x38], eax
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
call dword [sym.imp.KERNEL32.dll_HeapAlloc]
mov ebx, eax
test ebx, ebx
jne 0x1002c6ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov esi, 0x80070000
test eax, eax
jle 0x1002c6aa
movzx eax, ax
or eax, esi
test eax, eax
jns 0x1002c6c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x1002c825
movzx eax, ax
or eax, esi
jmp 0x1002c825
mov eax, 0x80004005
jmp 0x1002c825
lea eax, [ebx + 0x18]
mov dword [ebx], edi
push eax
lea edx, [ebx + 0x14]
mov ecx, edi
call fcn.10030a2b
mov eax, dword [ebp - 0x30]
cmp eax, 1
ja 0x1002c6f8
mov ecx, edi
call fcn.10030c3b
test eax, eax
je 0x1002c8a5
mov eax, dword [ebp - 0x30]
and dword [ebp - 0x2c], esi
lea edi, [ebp - 0x28]
push 8
pop ecx
mov dword [ebx + 0x1c], eax
mov esi, 0x80
xor eax, eax
rep stosd dword es:[edi], eax
push 0x10
lea eax, [ebp - 0x28]
push eax
push 0x10006034
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1002c747
cmp eax, 0x10
ja 0x1002c747
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x10004540
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x1002c747
mov esi, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x34]
lea eax, [ebx + 4]
push eax
push esi
push 1
mov ecx, edi
call fcn.100427bb
mov esi, eax
test esi, esi
jns 0x1002c769
push esi
push 0xedd
jmp 0x1002c810
and dword [ebp - 0x2c], 0
lea edi, [ebp - 0x28]
push 8
pop ecx
xor eax, eax
mov esi, 0x400
push 0x10
rep stosd dword es:[edi], eax
pop edi
push edi
lea eax, [ebp - 0x28]
push eax
push 0x1000608c
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1002c7b7
cmp eax, edi
ja 0x1002c7b7
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x10004540
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x1002c7b7
mov esi, dword [ebp - 0x2c]
push edi
lea eax, [ebp - 0x28]
push eax
push 0x100060c0
call dword [sym.imp.KERNEL32.dll_GetEnvironmentVariableW]
mov dword [ebp - 0x2c], eax
test eax, eax
je 0x1002c7f1
cmp eax, edi
ja 0x1002c7f1
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x28]
push 0x10004540
push eax
call dword [sym.imp.msvcrt.dll_swscanf_s]
add esp, 0xc
test eax, eax
jle 0x1002c7f1
mov eax, dword [ebp - 0x2c]
jmp 0x1002c7f4
xor eax, eax
inc eax
mov edi, dword [ebp - 0x34]
lea ecx, [ebx + 8]
push ecx
push esi
push eax
mov ecx, edi
call fcn.100427bb
mov esi, eax
test esi, esi
jns 0x1002c838
push esi
push 0xef9
mov ecx, 0x10006068
call fcn.1003a254
mov edx, ebx
mov ecx, edi
call fcn.1002c618
mov eax, esi
mov ecx, dword [ebp - 8]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.10083b20
mov esp, ebp
pop ebp
ret 4
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentThread]
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
mov eax, dword [ebp - 0x30]
dec eax
push eax
mov eax, dword [ebx + 8]
push dword [eax + 0x10]
call dword [sym.imp.KERNEL32.dll_SetThreadIdealProcessor]
push 0
lea edx, [ebp - 0x34]
mov ecx, edi
call fcn.10030a2b
test dword [ebp - 0x34], 0x1000
je 0x1002c89d
mov eax, dword [ebp - 0x30]
push 4
pop ecx
cmp eax, ecx
ja 0x1002c879
mov ecx, eax
lea eax, [ebx + 0xc]
push eax
push 0xa
push ecx
mov ecx, edi
call fcn.100427bb
mov esi, eax
test esi, esi
jns 0x1002c8a5
push esi
push 0xf0c
mov ecx, 0x10006068
call fcn.1003a254
test esi, esi
js 0x1002c81a
mov eax, dword [0x10086660]
and dword [ebx + 0x24], 0
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0x38]
mov dword [eax], ebx
test edi, edi
je 0x1002c823
mov dword [edi + 0xac], ebx
jmp 0x1002c823