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

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
sub rsp, 0x58
mov rax, qword [r8 + 8]
mov r10, qword [rcx + 8]
xor ebx, ebx
movzx r12d, byte [rax + 0x11]
mov eax, dword [rax]
mov rdi, r9
mov rbp, r8
mov rsi, rdx
mov r13, rcx
cmp dword [r10], eax
je 0x140044167
lea rcx, str.Only_works_with_same_format_surfaces
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14001bc50
test rdx, rdx
je 0x1400441a5
mov ecx, dword [rdx]
test ecx, ecx
js 0x14004418d
mov edx, dword [rdx + 4]
test edx, edx
js 0x14004418d
add ecx, dword [rsi + 8]
cmp ecx, dword [r13 + 0x10]
jg 0x14004418d
mov ecx, dword [rsi + 0xc]
add ecx, edx
cmp ecx, dword [r13 + 0x14]
jle 0x1400441bd
lea rcx, str.Invalid_source_blit_rectangle
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14001bc50
mov eax, dword [rcx + 0x10]
mov qword [rsp + 0x30], rbx
lea rsi, [rsp + 0x30]
mov dword [rsp + 0x38], eax
mov eax, dword [rcx + 0x14]
mov dword [rsp + 0x3c], eax
test r9, r9
je 0x1400441ff
mov ecx, dword [r9]
test ecx, ecx
js 0x1400441e7
mov edx, dword [r9 + 4]
test edx, edx
js 0x1400441e7
add ecx, dword [r9 + 8]
cmp ecx, dword [r8 + 0x10]
jg 0x1400441e7
mov ecx, dword [r9 + 0xc]
add ecx, edx
cmp ecx, dword [r8 + 0x14]
jle 0x140044219
lea rcx, str.Invalid_destination_blit_rectangle
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
jmp fcn.14001bc50
mov eax, dword [r8 + 0x10]
mov qword [rsp + 0x40], rbx
lea rdi, [rsp + 0x40]
mov dword [rsp + 0x48], eax
mov eax, dword [r8 + 0x14]
mov dword [rsp + 0x4c], eax
test byte [r8], 2
mov qword [rsp + 0x98], r14
mov dword [rsp + 0xa0], ebx
mov r14d, ebx
je 0x14004425c
mov rcx, r8
call fcn.140042470
test eax, eax
jns 0x14004424e
lea rcx, str.Unable_to_lock_destination_surface
call fcn.14001bc50
jmp 0x1400443e1
mov r14d, 1
mov dword [rsp + 0xa0], r14d
test byte [r13], 2
mov dword [rsp + 0x20], ebx
je 0x140044299
mov rcx, r13
call fcn.140042470
test eax, eax
jns 0x140044291
test r14d, r14d
je 0x140044280
mov rcx, rbp
call fcn.140042a20
lea rcx, str.Unable_to_lock_source_surface
call fcn.14001bc50
jmp 0x1400443e1
mov dword [rsp + 0x20], 1
mov ecx, dword [rdi + 0xc]
mov eax, dword [rsi + 0xc]
mov r14d, dword [rdi + 4]
shl eax, 0x10
mov qword [rsp + 0x50], r15
mov r15d, 0x10000
cdq
idiv ecx
mov dword [rsp + 0x24], eax
mov eax, dword [rsi + 4]
mov dword [rsp + 0x90], eax
lea eax, [rcx + r14]
mov dword [rsp + 0x28], eax
cmp r14d, eax
jge 0x1400443b9
nop word [rax + rax]
mov eax, dword [rdi]
mov ecx, dword [rbp + 0x18]
imul ecx, r14d
imul eax, r12d
movsxd r8, ecx
cdqe
add r8, rax
add r8, qword [rbp + 0x20]
cmp r15d, 0x10000
jl 0x140044351
mov ebx, dword [rsp + 0x90]
mov eax, dword [rsi]
mov r9d, dword [r13 + 0x18]
imul eax, r12d
mov r11, qword [r13 + 0x20]
movsxd r10, eax
mov edx, r15d
shr rdx, 0x10
mov ecx, r9d
mov eax, edx
neg eax
shl eax, 0x10
add r15d, eax
imul ecx, ebx
add ebx, edx
mov dword [rsp + 0x90], ebx
nop word [rax + rax]
movsxd rbx, ecx
add ecx, r9d
add rbx, r11
add rbx, r10
dec rdx
jne 0x140044340
mov ecx, r12d
dec ecx
je 0x140044397
dec ecx
je 0x140044386
dec ecx
je 0x140044375
dec ecx
jne 0x1400443a6
mov r9d, dword [rdi + 8]
mov edx, dword [rsi + 8]
mov rcx, rbx
call fcn.140044570
jmp 0x1400443a6
mov r9d, dword [rdi + 8]
mov edx, dword [rsi + 8]
mov rcx, rbx
call fcn.1400444e0
jmp 0x1400443a6
mov r9d, dword [rdi + 8]
mov edx, dword [rsi + 8]
mov rcx, rbx
call fcn.140044470
jmp 0x1400443a6
mov r9d, dword [rdi + 8]
mov edx, dword [rsi + 8]
mov rcx, rbx
call fcn.140044400
add r15d, dword [rsp + 0x24]
inc r14d
cmp r14d, dword [rsp + 0x28]
jl 0x1400442e0
cmp dword [rsp + 0xa0], 0
mov r15, qword [rsp + 0x50]
je 0x1400443d0
mov rcx, rbp
call fcn.140042a20
cmp dword [rsp + 0x20], 0
je 0x1400443df
mov rcx, r13
call fcn.140042a20
xor eax, eax
mov r14, qword [rsp + 0x98]
add rsp, 0x58
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret