Function at 0x1000d8e0
Capabilities:
Create thread

Disassembly:
sub rsp, 0x48
cmp r8d, 4
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x68], rdi
mov rdi, rcx
mov rsi, rdx
mov qword [rcx + 0x20], rdx
mov dword [rcx + 0x28], r8d
je 0x1000d91b
cmp r8d, 8
je 0x1000d91b
cmp r8d, 0x10
je 0x1000d91b
cmp r8d, 0x18
je 0x1000d91b
mov dword [rcx + 0x28], 8
mov eax, dword [rcx + 0x28]
mov dword [rcx + 8], eax
xor ecx, ecx
call qword [sym.imp.GDI32.dll_CreateCompatibleDC]
lea rcx, str.display
xor r9d, r9d
xor r8d, r8d
xor edx, edx
mov qword [rdi + 0x50], rax
call qword [sym.imp.GDI32.dll_CreateDCA]
mov edx, 8
mov rcx, rax
mov qword [rdi + 0x48], rax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov rcx, qword [rdi + 0x48]
mov edx, 0xa
mov dword [rdi + 0x60], eax
call qword [sym.imp.GDI32.dll_GetDeviceCaps]
mov edx, dword [rdi + 0x60]
mov rcx, qword [rdi + 0x48]
mov r8d, eax
mov dword [rdi + 0x64], eax
call qword [sym.imp.GDI32.dll_CreateCompatibleBitmap]
mov qword [rdi + 0x58], rax
mov eax, dword [rdi + 0x64]
imul eax, dword [rdi + 0x60]
shl eax, 2
movsxd rcx, eax
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rdi + 0x70], rax
mov eax, dword [rdi + 0x64]
imul eax, dword [rdi + 0x60]
shl eax, 2
movsxd rcx, eax
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov rcx, qword [rdi + 0x70]
test rcx, rcx
mov qword [rdi + 0x78], rax
je 0x1000d9c6
mov eax, dword [rdi + 0x64]
xor edx, edx
imul eax, dword [rdi + 0x60]
shl eax, 2
movsxd r8, eax
call sub.MSVCR80.dll_memset
mov rcx, qword [rdi + 0x78]
test rcx, rcx
je 0x1000d9e3
mov eax, dword [rdi + 0x64]
xor edx, edx
imul eax, dword [rdi + 0x60]
shl eax, 2
movsxd r8, eax
call sub.MSVCR80.dll_memset
mov eax, 0x66666667
mov qword [rsp + 0x58], rbx
imul dword [rdi + 0x60]
mov eax, 0x66666667
sar edx, 4
mov ecx, edx
shr ecx, 0x1f
lea r8d, [rdx + rcx + 1]
imul dword [rdi + 0x64]
sar edx, 4
mov eax, edx
shr eax, 0x1f
lea ebx, [rdx + rax + 1]
imul ebx, r8d
lea eax, [rbx + 2]
movsxd rcx, eax
mov eax, 2
mul rcx
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
mov qword [rdi + 0x80], rax
mov eax, dword [rdi + 0x64]
imul eax, dword [rdi + 0x60]
lea eax, [rbx + rax*2]
lea eax, [rax + rax + 9]
movsxd rbx, eax
mov rcx, rbx
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
lea rcx, [rbx + 0x20]
mov qword [rdi + 0x88], rax
call sub.MSVCR80.dll_void____ptr64___cdecl_operator_new_unsigned_long_long_unsigned___int64__
cmp qword [rdi + 0x58], 0
mov qword [rdi + 0x98], rax
je 0x1000db27
cmp qword [rdi + 0x48], 0
je 0x1000db27
cmp qword [rdi + 0x50], 0
je 0x1000db27
cmp qword [rdi + 0x70], 0
je 0x1000db27
cmp qword [rdi + 0x78], 0
je 0x1000db27
cmp qword [rdi + 0x88], 0
je 0x1000db27
test rax, rax
je 0x1000db27
movzx eax, word [rdi + 0x60]
lea rcx, [rdi + 0x68]
mov dword [rsp + 0x20], 0xab01
mov word [rsp + 0x24], ax
movzx eax, word [rdi + 0x64]
mov word [rsp + 0x26], ax
call qword [sym.imp.USER32.dll_GetCursorPos]
movzx r11d, word [rdi + 0x68]
movzx eax, word [rdi + 0x6c]
lea rdx, [rsp + 0x20]
mov rcx, rsi
mov word [rsp + 0x28], r11w
mov word [rsp + 0x2a], ax
call fcn.10004b40
lea rcx, [0x1000d7f0]
mov r8, rdi
xor edx, edx
call qword [sym.imp.MSVCR80.dll__beginthread]
mov qword [rdi + 0x38], rax
mov eax, 1
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
add rsp, 0x48
ret
mov rcx, rdi
call fcn.1000cbf0
lea rdx, [rsp + 0x30]
mov rcx, rsi
mov dword [rsp + 0x30], 0xab02
call fcn.10004b40
mov rdi, qword [rsp + 0x68]
mov rsi, qword [rsp + 0x60]
mov rbx, qword [rsp + 0x58]
xor eax, eax
add rsp, 0x48
ret