Function at 0x1002e38
Capabilities:
Check os version

Disassembly:
push ebp
lea ebp, [esp - 0x78]
sub esp, 0x1d4
push ebx
push esi
lea eax, [ebp - 0xc4]
mov ebx, ecx
push eax
mov dword [ebp + 0x6c], ebx
mov dword [ebp - 0xc4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov eax, dword [ebx + 8]
xor esi, esi
cmp eax, esi
jne 0x1002e73
cmp dword [ebx + 0x30], esi
jne 0x10030e3
mov ecx, dword [ebx + 0xc]
xor ecx, eax
jne 0x1002e8d
cmp dword [ebx + 0x30], esi
jne 0x1002e8d
cmp dword [ebx + 0x10], esi
jne 0x1002e8d
cmp dword [ebx + 0x14], esi
je 0x10030e3
push esi
push esi
push esi
push 0x1001240
call dword [sym.imp.GDI32.dll_CreateDCA]
cmp eax, esi
mov dword [ebp + 0x74], eax
je 0x10030da
cmp dword [ebp - 0xb4], 1
jne 0x1002ed3
cmp dword [ebp - 0xc0], 4
jne 0x1002ed3
cmp dword [ebp - 0xbc], 0xa
je 0x1002eca
cmp dword [ebp - 0xbc], 0x5a
jne 0x1002ed3
push 0xffffffffffffffff
mov ecx, ebx
call fcn.01002c5e
cmp dword [ebx + 0x18], esi
push edi
jbe 0x1002f73
mov eax, dword [ebx + 8]
lea edi, [ebp + esi*4 + 0x64]
and dword [edi], 0
test al, 1
je 0x1002ef5
mov ecx, dword [ebx + 0x20]
xor edx, edx
inc edx
shl edx, cl
mov dword [edi], edx
test al, 2
je 0x1002f03
mov ecx, dword [ebx + 0x24]
xor edx, edx
inc edx
shl edx, cl
or dword [edi], edx
test al, 4
je 0x1002f11
mov ecx, dword [ebx + 0x28]
xor edx, edx
inc edx
shl edx, cl
or dword [edi], edx
test al, 8
je 0x1002f1f
mov ecx, dword [ebx + 0x2c]
xor eax, eax
inc eax
shl eax, cl
or dword [edi], eax
mov edx, dword [edi]
push 0x18
pop ecx
push 8
pop eax
mov dword [ebp + 0x40], edx
lea edx, [ebp + 0x5c]
push edx
push eax
mov dword [ebp + 0x3c], eax
mov dword [ebp + 0x5c], eax
lea eax, [ebp + 0x2c]
push eax
push ecx
push 0x7306
push dword [ebp + 0x74]
mov dword [ebp + 0x2c], ecx
mov dword [ebp + 0x30], 0x110006
mov dword [ebp + 0x34], esi
call dword [sym.imp.GDI32.dll_ExtEscape]
test eax, eax
je 0x1002f64
push dword [ebp + 0x74]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x1002f69
mov eax, dword [ebp + 0x60]
mov dword [edi], eax
inc esi
cmp esi, dword [ebx + 0x18]
jb 0x1002edd
mov eax, dword [ebx + 0x18]
lea edi, [eax + eax*2]
lea edi, [edi*4 + 0x10]
xor edx, edx
test eax, eax
mov dword [ebp + 4], edi
mov dword [ebp + 8], 0x120008
mov dword [ebp + 0xc], esi
jbe 0x1002fae
lea ecx, [ebp + 0x18]
mov esi, dword [ebp + edx*4 + 0x64]
mov dword [ecx], edx
mov dword [ecx - 4], 0xc
mov dword [ecx + 4], esi
inc edx
add ecx, 0xc
cmp edx, eax
jb 0x1002f96
lea eax, [eax + eax*2]
lea eax, [eax*8 + 4]
lea ecx, [ebp - 0x30]
push ecx
push eax
mov dword [ebp - 0x30], eax
lea eax, [ebp + 4]
push eax
push edi
push 0x7306
push dword [ebp + 0x74]
call dword [sym.imp.GDI32.dll_ExtEscape]
test eax, eax
je 0x1002fe2
push dword [ebp + 0x74]
call dword [sym.imp.GDI32.dll_DeleteDC]
jmp 0x100300a
mov edx, dword [ebx + 0x18]
xor ecx, ecx
test edx, edx
jbe 0x100300a
lea eax, [ebp - 0x20]
mov esi, dword [eax - 4]
mov dword [ebp + ecx*4 + 0x54], esi
mov esi, dword [eax]
mov dword [ebp + ecx*4 + 0x4c], esi
mov esi, dword [eax + 4]
mov dword [ebp + ecx*4 + 0x44], esi
inc ecx
add eax, 0x18
cmp ecx, edx
jb 0x1002fee
mov edx, dword [ebx + 0x18]
and dword [ebp + 0x70], 0
mov ecx, edx
imul ecx, ecx, 0x4c
mov esi, ecx
shr ecx, 2
xor eax, eax
lea edi, [ebp - 0x15c]
rep stosd dword es:[edi], eax
mov ecx, esi
and ecx, 3
test edx, edx
rep stosb byte es:[edi], al
jbe 0x10030c8
lea esi, [ebp - 0x11c]
and dword [esi], 0
lea eax, [esi - 0x40]
push eax
push dword [ebp + 0x70]
mov ecx, ebx
call fcn.01002117
test eax, eax
je 0x10030b6
mov edi, dword [ebp + 0x70]
push 8
push dword [ebp + 0x74]
shl edi, 2
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ebx, eax
sub ebx, dword [ebp + edi + 0x54]
push 0xa
push dword [ebp + 0x74]
shr ebx, 1
call dword [sym.imp.GDI32.dll_GetDeviceCaps]
mov ecx, dword [ebp + edi + 0x4c]
mov edx, dword [ebp + edi + 0x64]
or word [esi], 0x181
sub eax, ecx
shr eax, 1
mov dword [esi - 0x18], edx
mov edx, dword [ebp + edi + 0x54]
mov dword [esi - 0x34], ecx
mov ecx, dword [ebp + edi + 0x44]
mov dword [esi - 0x2c], eax
xor eax, eax
mov dword [esi - 0x30], ebx
mov ebx, dword [ebp + 0x6c]
mov dword [esi + 4], 1
mov dword [esi - 0x38], edx
mov dword [esi - 0x14], ecx
mov dword [esi - 0x28], eax
mov dword [esi - 0x24], eax
mov dword [esi - 0x20], eax
mov dword [esi - 0x1c], eax
inc dword [ebp + 0x70]
mov eax, dword [ebp + 0x70]
add esi, 0x4c
cmp eax, dword [ebx + 0x18]
jb 0x100303a
push dword [ebx + 0x18]
lea eax, [ebp - 0x15c]
push eax
mov ecx, ebx
call fcn.01002719
pop edi
push dword [ebp + 0x74]
call dword [sym.imp.GDI32.dll_DeleteDC]
pop esi
pop ebx
add ebp, 0x78
leave
ret