Function at 0x140087848
Capabilities:
Resolve function by parsing pe exports

Disassembly:
mov rax, rsp
mov qword [rax + 0x20], r9
mov dword [rax + 0x18], r8d
mov qword [rax + 0x10], rdx
mov qword [rax + 8], rcx
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x98
movsxd rax, dword [rsp + 0x128]
xor r14d, r14d
mov rbp, qword [rsp + 0x108]
mov r12, rcx
mov rsi, qword [rsp + 0x110]
mov r13d, r14d
mov dword [rsp + 0x4c], r14d
lea rdi, [rax + rax*2]
mov dword [rsp + 0x50], r14d
shl rdi, 4
lea edx, [r14 + 1]
movsxd rcx, dword [rdi + rbp + 0x20]
mov eax, dword [rdi + rbp + 0x24]
imul rbx, rcx, 0x58
mov dword [rsp + 0x40], ecx
mov qword [rsp + 0x60], rcx
add rbx, rsi
cmp dword [rsp + 0x158], r14d
mov dword [rsp + 0x140], eax
mov ecx, dword [rbx + 0xc]
cmovne ecx, dword [0x1400962e4]
call fcn.14007d928
mov r15d, eax
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x160], r14d
je 0x14008793d
shr ax, 8
movzx ecx, al
mov eax, r15d
shr eax, 0x10
movzx edx, al
movzx r8d, r15b
lea eax, [r8 + rdx]
add eax, ecx
cmp eax, 0x258
jbe 0x14008793d
movzx eax, cx
neg dl
mov ecx, 0x100
neg r8b
sub cx, ax
movzx eax, dl
movzx ecx, cx
xor edx, edx
shl ecx, 8
shl eax, 0x10
or ecx, eax
movzx eax, r8b
or ecx, eax
call fcn.14007d928
mov edx, eax
jmp 0x140087940
mov edx, r15d
mov rcx, r12
call qword [sym.imp.GDI32.dll_SetTextColor]
mov eax, dword [0x1400970f8]
test eax, eax
sete r14b
mov dword [rsp + 0x6c], r14d
test eax, eax
jne 0x140087967
mov rdx, qword [rbx + 0x3c]
mov eax, dword [rbx + 0x24]
jmp 0x14008796e
mov rdx, qword [rbx + 0x34]
mov eax, dword [rbx + 0x20]
mov dword [rsp + 0x58], eax
test rdx, rdx
jne 0x1400879c5
mov r9, qword [rsp + 0x100]
mov rdx, rbx
mov r8, qword [rsp + 0xf8]
mov dword [rsp + 0x28], r14d
call fcn.14007f2bc
mov r9, qword [rsp + 0x100]
mov eax, r14d
mov r8, qword [rsp + 0xf8]
xor eax, 1
mov rdx, rbx
mov dword [rsp + 0x28], eax
call fcn.14007f2bc
test r14d, r14d
je 0x1400879c1
mov rdx, qword [rbx + 0x3c]
jmp 0x1400879c5
mov rdx, qword [rbx + 0x34]
mov rcx, r12
call qword [sym.imp.GDI32.dll_SelectObject]
mov rax, qword [rsp + 0xe8]
cmp r12, rax
je 0x1400879e8
mov rdx, qword [rbx + 0x3c]
mov rcx, rax
call qword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [rsp + 0x128]
mov r8, rsi
mov r9d, dword [rsp + 0x120]
mov rcx, rbp
mov edx, dword [rsp + 0x138]
mov dword [rsp + 0x20], eax
call fcn.140087788
mov ecx, eax
mov dword [rsp + 0x44], eax
xor eax, eax
mov edx, 1
cmp ecx, edx
mov dword [rsp + 0x48], edx
setg al
mov dword [rsp + 0x150], eax
test r14d, r14d
jne 0x140087a48
cmp dword [rsp + 0x148], r13d
jne 0x140087a48
mov r14d, dword [rdi + rbp + 0xc]
add r14d, dword [rdi + rbp]
mov ebp, dword [rdi + rbp + 8]
jmp 0x140087a55
mov r14d, dword [rdi + rbp + 0xc]
add r14d, dword [rdi + rbp]
mov ebp, dword [rdi + rbp + 0x10]
lea r9, [0x1400b8308]
mov dword [rsp + 0xf0], ebp
mov r8d, r14d
mov edx, ebp
mov rcx, r12
call qword [sym.imp.GDI32.dll_MoveToEx]
mov r8d, dword [rsp + 0x40]
mov r10d, r8d
mov ecx, dword [rsp + 0x128]
mov dword [rsp + 0x70], r8d
cmp ecx, dword [rsp + 0x130]
jge 0x14008805b
mov rbp, qword [rsp + 0x60]
add rdi, 0x28
mov rax, qword [rsp + 0x108]
mov r9, rbp
add rdi, rax
mov qword [rsp + 0x80], rbp
mov qword [rsp + 0x78], rdi
mov ebx, dword [rdi - 4]
sub ebx, dword [rsp + 0x140]
add ebx, dword [rdi]
mov dword [rsp + 0x68], ebx
test ebx, ebx
jg 0x140087bc1
mov edx, dword [rsp + 0x48]
cmp edx, dword [rsp + 0x44]
jge 0x140087af6
mov eax, 1
mov dword [rsp + 0x40], r10d
add edx, eax
mov qword [rsp + 0x60], r9
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x150], eax
jmp 0x140087b68
add rdi, 0x30
mov r14d, 1
add ecx, r14d
mov qword [rsp + 0x78], rdi
mov dword [rsp + 0x128], ecx
cmp ecx, dword [rsp + 0x130]
jge 0x14008805b
mov r9d, dword [rsp + 0x120]
mov r8, rsi
mov edx, dword [rsp + 0x138]
mov dword [rsp + 0x20], ecx
mov rcx, rax
call fcn.140087788
mov ecx, dword [rsp + 0x150]
cmp eax, r14d
mov dword [rsp + 0x44], eax
cmovg ecx, r14d
mov dword [rsp + 0x48], r14d
mov dword [rsp + 0x150], ecx
mov ecx, dword [rsp + 0x40]
mov dword [rsp + 0x70], ecx
mov qword [rsp + 0x80], rbp
cmp dword [rsp + 0x6c], 0
mov eax, dword [rdi]
mov ebx, dword [rdi - 4]
mov dword [rsp + 0x68], eax
mov dword [rsp + 0x140], ebx
jne 0x140087b8e
cmp dword [rsp + 0x148], 0
jne 0x140087b8e
mov ebp, dword [rdi - 0x20]
jmp 0x140087b91
mov ebp, dword [rdi - 0x18]
mov r14d, dword [rdi - 0x28]
lea r9, [0x1400b8308]
add r14d, dword [rdi - 0x1c]
mov edx, ebp
mov r8d, r14d
mov dword [rsp + 0xf0], ebp
mov rcx, r12
call qword [sym.imp.GDI32.dll_MoveToEx]
mov r8d, dword [rsp + 0x40]
mov rbp, qword [rsp + 0x60]
jmp 0x140087bc8
mov ebx, dword [rsp + 0x140]
mov eax, dword [rsp + 0x120]
dec eax
movsxd rdx, eax
cmp rbp, rdx
jge 0x140087c10
imul rcx, rbp, 0x58
mov eax, 1
add rcx, 0x84
add rcx, rsi
cmp ebx, dword [rcx]
jl 0x140087c06
add r8d, eax
mov dword [rsp + 0x150], eax
add rbp, rax
add rcx, 0x58
cmp rbp, rdx
jl 0x140087bec
mov dword [rsp + 0x40], r8d
mov qword [rsp + 0x60], rbp
xor ebx, ebx
cmp dword [rsp + 0x150], ebx
je 0x140087e54
imul rdi, rbp, 0x58
mov ebp, dword [rsp + 0x6c]
test ebp, ebp
je 0x140087c36
mov rdx, qword [rdi + rsi + 0x3c]
mov eax, dword [rdi + rsi + 0x24]
jmp 0x140087c3f
mov rdx, qword [rdi + rsi + 0x34]
mov eax, dword [rdi + rsi + 0x20]
mov dword [rsp + 0x58], eax
test rdx, rdx
jne 0x140087ca4
mov r9, qword [rsp + 0x100]
movsxd rax, r8d
mov r8, qword [rsp + 0xf8]
imul rbx, rax, 0x58
mov dword [rsp + 0x28], ebp
add rbx, rsi
mov rdx, rbx
call fcn.14007f2bc
mov r9, qword [rsp + 0x100]
mov eax, ebp
mov r8, qword [rsp + 0xf8]
xor eax, 1
mov rdx, rbx
mov dword [rsp + 0x28], eax
call fcn.14007f2bc
xor r13d, r13d
test ebp, ebp
je 0x140087c9d
mov rdx, qword [rdi + rsi + 0x3c]
jmp 0x140087ca7
mov rdx, qword [rdi + rsi + 0x34]
jmp 0x140087ca7
xor r13d, r13d
mov rcx, r12
call qword [sym.imp.GDI32.dll_SelectObject]
mov rax, qword [rsp + 0xe8]
cmp rax, r12
je 0x140087ccb
mov rdx, qword [rdi + rsi + 0x3c]
mov rcx, rax
call qword [sym.imp.GDI32.dll_SelectObject]
mov eax, dword [rsp + 0x48]
mov ebp, 1
mov dword [rsp + 0x150], r13d
cmp eax, ebp
jne 0x140087d44
cmp dword [rsp + 0x44], ebp
jle 0x140087dc0
mov eax, dword [rdi + rsi + 0x44]
mov ebx, r13d
test eax, eax
je 0x140087d0b
cmp eax, 4
je 0x140087d01
mov r15d, dword [rdi + rsi + 0x48]
jmp 0x140087d0d
mov r15d, dword [rdi + rsi + 0x4c]
mov edx, r13d
jmp 0x140087d0f
mov ebx, ebp
mov edx, ebp
cmp dword [rsp + 0x158], r13d
cmovne r15d, dword [0x1400962e4]
mov ecx, r15d
call fcn.14007d928
mov edx, eax
mov dword [rsp + 0x54], eax
mov rcx, r12
mov r15d, eax
call qword [sym.imp.GDI32.dll_SetTextColor]
mov edx, dword [rdi + rsi + 0x54]
mov r13d, dword [rdi + rsi + 0x50]
jmp 0x140087dad
cmp eax, 2
jne 0x140087dc0
cmp dword [rsp + 0x44], 3
jne 0x140087dc0
mov ecx, dword [rdi + rsi + 0x44]
mov ebx, r13d
sub ecx, 3
je 0x140087d6d
mov edx, ebp
cmp ecx, ebp
je 0x140087d66
mov ebx, ebp
jmp 0x140087d75
mov r15d, dword [rdi + rsi + 0x48]
jmp 0x140087d75
mov r15d, dword [rdi + rsi + 0x4c]
mov edx, r13d
cmp dword [rsp + 0x158], r13d
cmovne r15d, dword [0x1400962e4]
mov ecx, r15d
call fcn.14007d928
mov edx, eax
mov dword [rsp + 0x54], eax
mov rcx, r12
mov r15d, eax
call qword [sym.imp.GDI32.dll_SetTextColor]
mov edx, dword [rdi + rsi + 0x54]
mov r13d, dword [rdi + rsi + 0x50]
neg edx
neg r13d
mov rbp, qword [rsp + 0x60]
mov dword [rsp + 0x4c], edx
mov dword [rsp + 0x50], r13d
jmp 0x140087e58
mov ecx, dword [rdi + rsi + 0xc]
mov edx, ebp
cmp dword [rsp + 0x158], r13d
mov ebx, r13d
cmovne ecx, dword [0x1400962e4]
call fcn.14007d928
mov r15d, eax
mov dword [rsp + 0x54], eax
cmp dword [rsp + 0x160], r13d
je 0x140087e3e
shr ax, 8
movzx ecx, al
mov eax, r15d
shr eax, 0x10
movzx edx, al
movzx r8d, r15b
lea eax, [r8 + rdx]
add eax, ecx
cmp eax, 0x258
jbe 0x140087e3e
movzx eax, cx
neg dl
mov ecx, 0x100
neg r8b
sub cx, ax
movzx eax, dl
movzx ecx, cx
mov edx, ebp
shl ecx, 8
shl eax, 0x10
or ecx, eax
movzx eax, r8b
or ecx, eax
call fcn.14007d928
mov edx, eax
jmp 0x140087e41
mov edx, r15d
mov rcx, r12
call qword [sym.imp.GDI32.dll_SetTextColor]
xor edx, edx
xor r13d, r13d
jmp 0x140087dad
mov edx, dword [rsp + 0x4c]
movsxd rdi, dword [rsp + 0x140]
mov ecx, 1
imul rax, rbp, 0x58
mov ebp, dword [rax + rsi + 0x30]
add ebp, dword [rax + rsi + 0x2c]
mov eax, dword [rax + rsi + 0x44]
sub ebp, edi
cmp dword [rsp + 0x68], ebp
cmovle ebp, dword [rsp + 0x68]
cmp eax, ecx
je 0x140088037
add eax, 0xfffffffe
cmp eax, 2
ja 0x140087fef
test ebx, ebx
jne 0x140087f78
test edx, edx
jns 0x140087ea6
mov edi, edx
neg edi
jmp 0x140087ead
xor edi, edi
test edx, edx
cmovg edi, edx
test r13d, r13d
jns 0x140087ec0
mov eax, r13d
neg eax
cmp eax, edi
cmovle eax, edi
mov edi, eax
jmp 0x140087ec9
jle 0x140087ec9
cmp r13d, edi
cmovg edi, r13d
mov eax, dword [rsp + 0x44]
cmp dword [rsp + 0x48], eax
cmove edi, ecx
xor r12d, r12d
test edi, edi
jle 0x140087f69
movsxd r13, dword [rsp + 0x140]
add r13, qword [rsp + 0x118]
mov rsi, qword [rsp + 0xe0]
mov r15d, dword [rsp + 0x50]
mov r9d, r12d
mov r8d, edi
mov rcx, rsi
call fcn.14007d9f4
mov r9d, r12d
mov r8d, edi
mov edx, r15d
mov rcx, rsi
mov ebx, eax
call fcn.14007d9f4
mov r8d, dword [rsp + 0xf0]
lea r9d, [r14 + rbx]
mov rdx, qword [rsp + 0xe8]
add r8d, eax
mov eax, dword [rsp + 0x148]
mov rcx, rsi
mov dword [rsp + 0x30], eax
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], r13
call fcn.1400874e4
mov edx, dword [rsp + 0x4c]
inc r12d
cmp r12d, edi
jl 0x140087efc
mov rsi, qword [rsp + 0x110]
mov r15d, dword [rsp + 0x54]
mov edi, dword [rsp + 0x140]
mov r12, qword [rsp + 0xe0]
mov rcx, qword [rsp + 0xe8]
lea r9, [rsp + 0x88]
movsxd rdx, edi
mov r8d, ebp
add rdx, qword [rsp + 0x118]
call qword [sym.imp.GDI32.dll_GetTextExtentPoint32A]
mov eax, dword [rsp + 0xf0]
add eax, dword [rsp + 0x88]
mov r13d, dword [rsp + 0x50]
add edi, ebp
mov rbp, qword [rsp + 0x60]
mov ecx, dword [rsp + 0x128]
mov r8d, dword [rsp + 0x40]
mov r9, qword [rsp + 0x80]
mov r10d, dword [rsp + 0x70]
mov dword [rsp + 0x140], edi
mov rdi, qword [rsp + 0x78]
mov dword [rsp + 0xf0], eax
mov rax, qword [rsp + 0x108]
jmp 0x140087ab6
test ebx, ebx
jne 0x140087f78
mov r8d, dword [rsp + 0xf0]
mov rax, rdi
add rax, qword [rsp + 0x118]
mov r9d, r14d
sub r8d, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x148]
mov rdx, qword [rsp + 0xe8]
mov dword [rsp + 0x30], ecx
mov rcx, r12
mov dword [rsp + 0x28], ebp
mov qword [rsp + 0x20], rax
call fcn.1400874e4
jmp 0x140087f78
test ebx, ebx
jne 0x140087f78
mov r8d, dword [rsp + 0xf0]
lea r9d, [r14 + rdx]
mov rax, rdi
add rax, qword [rsp + 0x118]
add r8d, r13d
jmp 0x14008800e
add rsp, 0x98
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret