Function at 0x4078be
Capabilities:
Query environment variable

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x250
mov eax, dword [0x5e5620]
xor eax, ebp
mov dword [ebp - 4], eax
mov ecx, dword [ebp + 8]
push ebx
mov dword [ebp - 0x214], ecx
xor ebx, ebx
mov ecx, dword [0x5ebc68]
push esi
push edi
mov edi, dword [ebp + 0xc]
mov dword [ebp - 0x210], edi
mov dword [ebp - 0x218], ebx
cmp dword [ecx + 0x220], ebx
je 0x407980
cmp word [ecx + 0x18], bx
je 0x407980
mov eax, dword [str.rainbow]
mov esi, ebx
jmp 0x40792d
push eax
lea eax, [ecx + 0x18]
push eax
call fcn.00552def
pop ecx
pop ecx
test eax, eax
je 0x407933
mov eax, dword [esi*4 + 0x5e40a4]
inc esi
mov ecx, dword [0x5ebc68]
test eax, eax
jne 0x40790f
jmp 0x407948
push esi
push edi
call fcn.0040b27a
pop ecx
pop ecx
mov ecx, dword [0x5ebc68]
mov dword [ebp - 0x218], eax
cmp dword [esi*4 + 0x5e40a0], ebx
jne 0x407980
push 0x104
lea eax, [ebp - 0x20c]
push eax
lea eax, [ecx + 0x18]
push eax
call dword [sym.imp.KERNEL32.dll_ExpandEnvironmentStringsW]
lea eax, [ebp - 0x20c]
push eax
call fcn.00408792
pop ecx
mov ecx, dword [0x5ebc68]
mov dword [ebp - 0x218], eax
push dword [ebp - 0x214]
call fcn.004097f9
push eax
call dword [sym.imp.GDI32.dll_CreateSolidBrush]
mov esi, eax
push esi
push edi
mov edi, dword [ebp - 0x214]
push edi
call dword [sym.imp.USER32.dll_FillRect]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
mov esi, dword [ebp - 0x218]
test esi, esi
je 0x407cc5
push edi
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push esi
push eax
mov dword [ebp - 0x21c], eax
call dword [sym.imp.GDI32.dll_SelectObject]
push 6
pop ecx
mov dword [ebp - 0x250], eax
lea edi, [ebp - 0x23c]
xor eax, eax
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x23c]
push eax
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectW]
mov eax, dword [0x5ebc68]
mov eax, dword [eax + 0x220]
sub eax, 1
je 0x407c02
sub eax, 1
je 0x407b7c
sub eax, 1
je 0x407a25
sub eax, 1
je 0x407a25
sub eax, 1
je 0x407a25
sub eax, 1
jne 0x407c9f
mov esi, dword [ebp - 0x214]
push 4
push esi
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
push ebx
push ebx
push ebx
push esi
call dword [sym.imp.GDI32.dll_SetBrushOrgEx]
mov esi, dword [ebp - 0x210]
lea edi, [ebp - 0x24c]
mov eax, dword [0x5ebc68]
movsd dword es:[edi], dword [esi]
mov edx, dword [eax + 0x220]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
cmp edx, 3
je 0x407b32
mov edi, dword [ebp - 0x210]
xor ecx, ecx
movd xmm1, dword [ebp - 0x238]
movd xmm0, dword [ebp - 0x234]
cvtdq2pd xmm0, xmm0
mov eax, dword [edi + 8]
sub eax, dword [edi]
movd xmm2, eax
mov eax, dword [edi + 0xc]
sub eax, dword [edi + 4]
cvtdq2pd xmm1, xmm1
movd xmm3, eax
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm3, xmm3
divsd xmm1, xmm0
movaps xmm0, xmm2
divsd xmm0, xmm3
comisd xmm1, xmm0
setae cl
xor eax, eax
cmp edx, 4
push ecx
sete al
push ecx
cmp ecx, eax
jne 0x407af2
divsd xmm2, xmm1
movsd qword [esp], xmm2
call fcn.00560d30
mov eax, dword [edi + 0xc]
fstp qword [ebp - 0x224]
cvttsd2si esi, qword [ebp - 0x224]
pop ecx
pop ecx
mov ecx, dword [edi + 4]
sub eax, ecx
sub eax, esi
cdq
sub eax, edx
sar eax, 1
lea edx, [eax + ecx]
lea eax, [edx + esi]
jmp 0x407b3e
mulsd xmm3, xmm1
movsd qword [esp], xmm3
call fcn.00560d30
mov eax, dword [edi + 8]
fstp qword [ebp - 0x224]
cvttsd2si esi, qword [ebp - 0x224]
pop ecx
pop ecx
mov ecx, dword [edi]
sub eax, ecx
sub eax, esi
cdq
sub eax, edx
mov edx, dword [ebp - 0x248]
sar eax, 1
lea edi, [eax + ecx]
mov eax, dword [ebp - 0x240]
lea ecx, [edi + esi]
jmp 0x407b4a
mov eax, dword [ebp - 0x240]
mov edx, dword [ebp - 0x248]
mov edi, dword [ebp - 0x24c]
mov ecx, dword [ebp - 0x244]
push 0xcc0020
push dword [ebp - 0x234]
sub eax, edx
sub ecx, edi
push dword [ebp - 0x238]
push ebx
push ebx
push dword [ebp - 0x21c]
push eax
push ecx
push edx
push edi
push dword [ebp - 0x214]
call dword [sym.imp.GDI32.dll_StretchBlt]
jmp 0x407c9f
mov esi, dword [ebp - 0x210]
mov edi, dword [esi]
cmp edi, dword [esi + 8]
jge 0x407c9f
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 0x238]
mov eax, dword [esi + 4]
mov dword [ebp - 0x210], eax
cmp eax, ecx
jge 0x407bf6
mov eax, dword [esi + 8]
sub eax, edi
push 0xcc0020
cmp edx, eax
push ebx
cmovl eax, edx
mov edx, dword [ebp - 0x210]
push ebx
push dword [ebp - 0x21c]
sub ecx, edx
cmp dword [ebp - 0x234], ecx
cmovl ecx, dword [ebp - 0x234]
push ecx
push eax
push edx
push edi
push dword [ebp - 0x214]
call dword [sym.imp.GDI32.dll_BitBlt]
mov eax, dword [ebp - 0x210]
add eax, dword [ebp - 0x234]
mov ecx, dword [esi + 0xc]
mov edx, dword [ebp - 0x238]
jmp 0x407b99
add edi, edx
cmp edi, dword [esi + 8]
jl 0x407b96
jmp 0x407c9f
mov ecx, dword [ebp - 0x210]
mov edx, dword [ebp - 0x238]
mov eax, dword [ecx + 8]
mov esi, eax
mov edi, dword [ecx]
sub esi, edi
cmp edx, esi
jl 0x407c2c
sub edx, esi
mov eax, edx
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x220], eax
jmp 0x407c3f
mov esi, edx
mov dword [ebp - 0x220], ebx
sub eax, esi
add eax, edi
cdq
sub eax, edx
mov edi, eax
sar edi, 1
mov eax, dword [ecx + 4]
mov edx, dword [ecx + 0xc]
mov ecx, edx
sub ecx, eax
mov dword [ebp - 0x210], eax
cmp dword [ebp - 0x234], ecx
jl 0x407c6e
mov eax, dword [ebp - 0x234]
sub eax, ecx
cdq
sub eax, edx
mov ebx, eax
mov eax, dword [ebp - 0x210]
sar ebx, 1
jmp 0x407c7d
mov ecx, dword [ebp - 0x234]
sub edx, ecx
add eax, edx
cdq
sub eax, edx
sar eax, 1
push 0xcc0020
push ebx
push dword [ebp - 0x220]
push dword [ebp - 0x21c]
push ecx
push esi
push eax
push edi
push dword [ebp - 0x214]
call dword [sym.imp.GDI32.dll_BitBlt]
mov ebx, dword [ebp - 0x218]
push ebx
push dword [ebp - 0x250]
call dword [sym.imp.GDI32.dll_SelectObject]
push dword [ebp - 0x21c]
call dword [sym.imp.GDI32.dll_DeleteDC]
push ebx
call dword [sym.imp.GDI32.dll_DeleteObject]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0054d24a
leave