Function at 0x100081d0
Capabilities:
Create thread

Disassembly:
mov eax, dword [esp + 8]
sub esp, 0x18
cmp eax, 4
push ebx
mov ebx, dword [esp + 0x20]
push esi
mov esi, ecx
push edi
mov dword [esi + 0x10], ebx
mov dword [esi + 0x14], eax
je 0x10008201
cmp eax, 8
je 0x10008201
cmp eax, 0x10
je 0x10008201
cmp eax, 0x18
je 0x10008201
mov dword [esi + 0x14], 8
mov eax, dword [esi + 0x14]
push 0
mov dword [esi + 4], eax
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
push 0
push 0
push 0
push str.display
mov dword [esi + 0x2c], eax
call dword [sym.imp.GDI32.dll_CreateDCA]
mov edi, dword [sym.imp.GDI32.dll_GetDeviceCaps]
push 8
push eax
mov dword [esi + 0x28], eax
call edi
mov ecx, dword [esi + 0x28]
push 0xa
push ecx
mov dword [esi + 0x34], eax
call edi
mov edx, dword [esi + 0x34]
mov dword [esi + 0x38], eax
push eax
mov eax, dword [esi + 0x28]
push edx
push eax
call dword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov ecx, dword [esi + 0x38]
mov dword [esi + 0x30], eax
imul ecx, dword [esi + 0x34]
shl ecx, 2
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esi + 0x38]
mov dword [esi + 0x44], eax
imul edx, dword [esi + 0x34]
shl edx, 2
push edx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edi, dword [esi + 0x44]
add esp, 8
test edi, edi
mov dword [esi + 0x48], eax
je 0x1000829b
mov ecx, dword [esi + 0x38]
xor eax, eax
imul ecx, dword [esi + 0x34]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov edi, dword [esi + 0x48]
test edi, edi
je 0x100082bc
mov ecx, dword [esi + 0x38]
xor eax, eax
imul ecx, dword [esi + 0x34]
shl ecx, 2
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [esi + 0x34]
mov eax, 0x66666667
imul ecx
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea ecx, [edx + eax + 1]
mov edx, dword [esi + 0x38]
mov eax, 0x66666667
imul edx
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea edi, [edx + eax + 1]
imul edi, ecx
lea ecx, [edi + edi + 4]
push ecx
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov edx, dword [esi + 0x38]
mov dword [esi + 0x4c], eax
imul edx, dword [esi + 0x34]
lea eax, [edi + edx*2]
lea edi, [eax + eax + 9]
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
add edi, 0x20
mov dword [esi + 0x50], eax
push edi
call sub.MSVCRT.dll_void____cdecl_operator_new_unsigned_int_
mov ecx, dword [esi + 0x30]
add esp, 0xc
test ecx, ecx
mov dword [esi + 0x58], eax
je 0x100083b7
mov ecx, dword [esi + 0x28]
test ecx, ecx
je 0x100083b7
mov ecx, dword [esi + 0x2c]
test ecx, ecx
je 0x100083b7
mov ecx, dword [esi + 0x44]
test ecx, ecx
je 0x100083b7
mov ecx, dword [esi + 0x48]
test ecx, ecx
je 0x100083b7
mov ecx, dword [esi + 0x50]
test ecx, ecx
je 0x100083b7
test eax, eax
je 0x100083b7
mov cx, word [esi + 0x34]
mov dx, word [esi + 0x38]
lea edi, [esi + 0x3c]
mov dword [esp + 0xc], 0xab01
push edi
mov word [esp + 0x14], cx
mov word [esp + 0x16], dx
call dword [sym.imp.USER32.dll_GetCursorPos]
mov cx, word [esi + 0x40]
mov ax, word [edi]
lea edx, [esp + 0xc]
mov word [esp + 0x16], cx
push edx
mov ecx, ebx
mov word [esp + 0x18], ax
call fcn.10002540
push esi
push 0
push 0x100089b0
call dword [sym.imp.MSVCRT.dll__beginthread]
add esp, 0xc
mov dword [esi + 0x20], eax
mov eax, 1
pop edi
pop esi
pop ebx
add esp, 0x18
ret 8
mov ecx, esi
call fcn.10008140
lea eax, [esp + 0x18]
mov ecx, ebx
push eax
mov dword [esp + 0x1c], 0xab02
call fcn.10002540
pop edi
pop esi
xor eax, eax
pop ebx
add esp, 0x18
ret 8