Function at 0x10012206
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x84
movzx eax, byte [ebp + 0xc]
test eax, eax
je 0x100122b6
lea eax, [ebp + 0x30]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp + 0x24]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x80]
movzx eax, byte [eax]
test eax, eax
je 0x1001228e
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x38]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [eax], 0xfffffff6
jmp 0x10012253
mov eax, dword [ebp - 8]
mov eax, dword [eax]
dec eax
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
cmp dword [eax], 0xffffffe5
jg 0x1001228c
mov byte [ebp - 2], 0
movzx eax, byte [ebp - 2]
test eax, eax
je 0x10012280
push 0x35af
push 0x3626
push 0x65a7
push 0
call fcn.10023758
add esp, 0x10
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x1001228a
jmp 0x10012248
jmp 0x10012248
jmp 0x100122b1
mov byte [ebp - 1], 0
movzx eax, byte [ebp - 1]
test eax, eax
je 0x100122b1
push 0
push 0x14bb
push 0x227
push 0x1517
call dword [sym.imp.GDI32.dll_GetSystemPaletteEntries]
jmp 0x10012439
mov eax, dword [ebp + 8]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x60], eax
lea eax, [ebp + 0x14]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp + 0x2c]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x48]
movzx eax, byte [eax]
test eax, eax
je 0x1001242d
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x3c]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x4c]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x10012364
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x10012364
mov dword [ebp - 0x20], 1
jmp 0x10012368
and dword [ebp - 0x20], 0
mov eax, dword [ebp - 0x18]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x18]
mov ecx, dword [ecx]
inc ecx
mov edx, dword [ebp - 0x18]
mov dword [edx], ecx
test eax, eax
jne 0x100123d7
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x10012395
mov eax, dword [ebp - 0x30]
cmp dword [eax], 0
ja 0x10012395
mov dword [ebp - 0x28], 1
jmp 0x10012399
and dword [ebp - 0x28], 0
mov eax, dword [ebp - 0x10]
mov eax, dword [eax]
imul eax, dword [ebp - 0x28]
dec eax
mov ecx, dword [ebp - 0x30]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov ecx, dword [ebp - 0x7c]
imul eax, dword [ecx]
mov ecx, dword [ebp - 0x10]
cmp eax, dword [ecx]
jg 0x100123c3
mov dword [ebp - 0x1c], 1
jmp 0x100123c7
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x2c]
mov eax, dword [eax]
cmp dword [ebp - 0x1c], eax
jge 0x100123d7
and dword [ebp - 0x24], 0
jmp 0x100123de
mov dword [ebp - 0x24], 1
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x24]
jge 0x100123f8
mov eax, 0xffff
test eax, eax
je 0x100123f8
mov dword [ebp - 0x14], 1
jmp 0x100123fc
and dword [ebp - 0x14], 0
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x14]
mov dword [eax], ecx
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
cmp dword [ebp - 0x14], eax
jge 0x1001241a
mov dword [ebp - 0x34], 1
jmp 0x1001241e
and dword [ebp - 0x34], 0
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x34]
sub ecx, dword [eax]
mov eax, dword [ebp - 0x10]
mov dword [eax], ecx
jmp 0x10012439
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsA]
mov esp, ebp
pop ebp
ret