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

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
cmp dword [rcx + 0x250], 0
mov r12, qword [rdx + 0x20]
mov ebp, dword [rdx + 0x1c]
mov rbx, rcx
mov r13, rdx
mov esi, r8d
mov rdi, r9
je 0x140038cd2
cmp qword [rcx + 0x260], 0
mov r10, qword [rcx + 0x168]
mov r9d, dword [rcx + 0x24c]
mov r8d, dword [rcx + 0x248]
mov edx, dword [rcx + 0x244]
jne 0x140038c4c
mov eax, dword [rcx + 0x294]
sub eax, edx
sub eax, r9d
mov edx, eax
mov ecx, dword [rbx + 0x240]
call r10
mov eax, dword [rbx + 0x248]
test eax, eax
je 0x140038cc8
mov edx, dword [rbx + 0x24c]
test edx, edx
je 0x140038cc8
cvtsi2ss xmm2, eax
movss xmm1, dword [0x14019e450]
mov rax, qword [rbx + 0x260]
movaps xmm0, xmm1
divss xmm0, xmm2
movss dword [rbx + 0x2a0], xmm0
movss xmm0, dword [0x14019e454]
test rax, rax
je 0x140038c9b
movaps xmm0, xmm1
cvtsi2ss xmm1, edx
divss xmm0, xmm1
movss dword [rbx + 0x2b4], xmm0
movss xmm0, dword [0x14019e440]
test rax, rax
je 0x140038cc0
movss xmm0, dword [0x14019e44c]
movss dword [rbx + 0x2d4], xmm0
xor r11d, r11d
mov dword [rbx + 0x250], r11d
cmp dword [rbx + 0x26c], 0
je 0x140038d01
cmp dword [rbx + 0x270], 0
mov ecx, 0xc11
jne 0x140038cf1
call qword [rbx + pe_nt_image_headers64]
jmp 0x140038cf7
call qword [rbx + 0x98]
xor r10d, r10d
mov dword [rbx + 0x26c], r10d
cmp dword [rbx + 0x270], 0
je 0x140038d69
cmp dword [rbx + 0x274], 0
je 0x140038d69
mov r10d, dword [rbx + 0x244]
mov ecx, dword [rbx + 0x27c]
cmp qword [rbx + 0x260], 0
mov rax, qword [rbx + 0x110]
mov r9d, dword [rbx + 0x284]
mov r8d, dword [rbx + 0x280]
lea edx, [r10 + rcx]
jne 0x140038d51
mov edx, dword [rbx + 0x294]
sub edx, r10d
sub edx, ecx
sub edx, r9d
mov ecx, dword [rbx + 0x278]
add ecx, dword [rbx + 0x240]
call rax
xor r9d, r9d
mov dword [rbx + 0x274], r9d
xor eax, eax
test r12, r12
setne al
cmp eax, dword [rbx + 0x288]
je 0x140038da7
mov ecx, 2
test r12, r12
jne 0x140038d95
call qword [rbx + 0x88]
xor r8d, r8d
mov dword [rbx + 0x288], r8d
jmp 0x140038dac
call qword [rbx + 0xa0]
mov dword [rbx + 0x288], 1
jmp 0x140038dba
test r12, r12
jne 0x140038dba
xor r15d, r15d
mov r14d, 0xc
xor r12d, r12d
jmp 0x140038dfb
mov rax, qword [r13 + 8]
xor r9d, r9d
mov r8d, 0x1406
mov dword [rsp + 0x20], 0x14
mov edx, 2
mov ecx, 2
mov r14d, 0x14
add rax, rdi
add rax, 0xc
mov qword [rsp + 0x28], rax
call qword [rbx + 0x160]
mov r15d, dword [r12 + 0x14]
mov r12d, dword [r12 + 0x10]
lea eax, [rsi - 2]
cmp eax, 7
ja case.default.0x140038e11
lea rdx, [0x14019e2a0]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
mov esi, 1
jmp case.0x140038e11.2
mov esi, 5
jmp case.0x140038e11.2
mov esi, 4
jmp case.0x140038e11.2
mov edx, r15d
mov ecx, r12d
call fcn.140050d3d
lea esi, [rax + 6]
cmp eax, 2
jbe case.0x140038e11.2
jmp 0x140038ea8
mov edx, r15d
mov ecx, r12d
call fcn.140050d3d
cmp eax, 1
je 0x140038e65
cmp eax, 2
je 0x140038e7d
test eax, eax
je 0x140038ecd
jmp 0x140038ea8
xor edx, edx
lea rcx, str.SDL_RENDER_OPENGL_NV12_RG_SHADER
call fcn.140079139
cmp eax, 1
sbb esi, esi
add esi, 0xb
jmp case.0x140038e11.2
xor edx, edx
lea rcx, str.SDL_RENDER_OPENGL_NV12_RG_SHADER
call fcn.140079139
cmp eax, 1
sbb esi, esi
add esi, 0xd
jmp case.0x140038e11.2
mov edx, r15d
mov ecx, r12d
call fcn.140050d3d
lea esi, [rax + 0xe]
cmp eax, 2
jbe case.0x140038e11.2
mov edx, r15d
mov ecx, r12d
call fcn.140050d3d
lea rcx, str.Unsupported_YUV_conversion_mode:__d_n
mov edx, eax
call fcn.140078bd0
jmp 0x1400391af
mov esi, 0x11
jmp case.0x140038e11.2
mov esi, 9
mov r15d, dword [rbx + 0x1d4]
test r15d, r15d
jne 0x140038ef9
mov r8d, 0x8b31
xor edx, edx
mov rcx, rbx
call fcn.140037534
mov r15d, eax
test eax, eax
je 0x1400391af
mov eax, esi
mov r12d, dword [rbx + rax*4 + 0x1d4]
test r12d, r12d
jne 0x140038f23
mov r8d, 0x8b30
mov edx, esi
mov rcx, rbx
call fcn.140037534
mov r12d, eax
test eax, eax
je 0x1400391af
mov rax, qword [rbx + 0x298]
test rax, rax
je 0x140038f3f
cmp dword [rax + 4], r15d
jne 0x140038f3f
cmp dword [rax + 8], r12d
je 0x1400391c0
mov rax, qword [rbx + 0x228]
mov rsi, rax
test rsi, rsi
je 0x140038fca
cmp r15d, dword [rsi + 4]
jne 0x140038f5a
cmp r12d, dword [rsi + 8]
je 0x140038f63
mov rsi, qword [rsi + 0x98]
jmp 0x140038f49
cmp rax, rsi
je 0x14003919e
mov rax, qword [rsi + 0x98]
test rax, rax
je 0x140038f86
mov rdx, qword [rsi + 0x90]
mov qword [rax + 0x90], rdx
mov rax, qword [rsi + 0x90]
test rax, rax
je 0x140038fa0
mov rdx, qword [rsi + 0x98]
mov qword [rax + 0x98], rdx
xor ecx, ecx
mov qword [rsi + 0x90], rcx
mov rax, qword [rbx + 0x228]
mov qword [rsi + 0x98], rax
mov qword [rax + 0x90], rsi
mov qword [rbx + 0x228], rsi
jmp 0x14003919e
mov edx, 0xa0
mov ecx, 1
call fcn.140041414
mov rsi, rax
test rax, rax
jne 0x140038fed
xor ecx, ecx
call fcn.140078cc6
jmp 0x1400391af
mov dword [rax + 4], r15d
mov dword [rax + 8], r12d
call qword [rbx + 0x58]
mov edx, r15d
mov ecx, eax
mov dword [rsi], eax
call qword [rbx + 0x18]
mov ecx, dword [rsi]
mov edx, r12d
call qword [rbx + 0x18]
xor edx, edx
mov ecx, dword [rsi]
lea r8, str.a_position
call qword [rbx + 0x20]
mov ecx, dword [rsi]
lea r8, str.a_color
mov edx, 1
call qword [rbx + 0x20]
lea r8, str.a_texCoord
mov edx, 2
mov ecx, dword [rsi]
call qword [rbx + 0x20]
mov ecx, dword [rsi]
call qword [rbx + 0xf8]
mov ecx, dword [rsi]
lea r8, [rsp + 0x4c]
mov edx, 0x8b82
call qword [rbx + 0xd8]
cmp dword [rsp + 0x4c], 0
jne 0x140039079
mov ecx, dword [rsi]
call qword [rbx + 0x68]
mov rcx, rsi
call fcn.14004149f
lea rcx, str.Failed_to_link_shader_program
call fcn.140078bd0
jmp 0x1400391af
mov ecx, dword [rsi]
lea rdx, str.u_projection
call qword [rbx + 0xf0]
mov ecx, dword [rsi]
lea rdx, str.u_texture_v
mov dword [rsi + 0xc], eax
call qword [rbx + 0xf0]
mov ecx, dword [rsi]
lea rdx, str.u_texture_u
mov dword [rsi + 0x18], eax
call qword [rbx + 0xf0]
mov ecx, dword [rsi]
lea rdx, str.u_texture
mov dword [rsi + 0x14], eax
call qword [rbx + 0xf0]
mov ecx, dword [rsi]
mov dword [rsi + 0x10], eax
call qword [rbx + 0x158]
mov ecx, dword [rsi + 0x18]
cmp ecx, 0xffffffff
je 0x1400390dc
mov edx, 2
call qword [rbx + 0x140]
mov ecx, dword [rsi + 0x14]
cmp ecx, 0xffffffff
je 0x1400390ef
mov edx, 1
call qword [rbx + 0x140]
mov ecx, dword [rsi + 0x10]
cmp ecx, 0xffffffff
je 0x1400390ff
xor edx, edx
call qword [rbx + 0x140]
mov ecx, dword [rsi + 0xc]
cmp ecx, 0xffffffff
je 0x140039119
lea r9, [rsi + 0x4c]
xor r8d, r8d
mov edx, 1
call qword [rbx + 0x150]
mov rax, qword [rbx + 0x228]
test rax, rax
je 0x140039135
mov qword [rsi + 0x98], rax
mov qword [rax + 0x90], rsi
jmp 0x14003913c
mov qword [rbx + 0x230], rsi
mov eax, dword [rbx + 0x220]
mov qword [rbx + 0x228], rsi
inc eax
mov dword [rbx + 0x220], eax
cmp eax, 8
jle 0x14003919e
mov rax, qword [rbx + 0x230]
mov ecx, dword [rax]
call qword [rbx + 0x68]
mov rax, qword [rbx + 0x230]
mov rax, qword [rax + 0x90]
mov qword [rbx + 0x230], rax
test rax, rax
je 0x140039198
mov rcx, qword [rax + 0x98]
call fcn.14004149f
mov rax, qword [rbx + 0x230]
xor edx, edx
mov qword [rax + 0x98], rdx
dec dword [rbx + 0x220]
mov ecx, dword [rsi]
call qword [rbx + 0x158]
mov qword [rbx + 0x298], rsi
jmp 0x1400391c0
xor eax, eax
mov qword [rbx + 0x298], rax
or eax, 0xffffffff
jmp 0x140039331
mov r12, qword [rbx + 0x298]
cmp dword [r12 + 0xc], 0xffffffff
je 0x140039217
lea rsi, [rbx + 0x2a0]
lea r15, [r12 + 0x4c]
mov r8d, 0x40
mov rdx, rsi
mov rcx, r15
call fcn.140041695
test eax, eax
je 0x140039217
mov ecx, dword [r12 + 0xc]
xor r8d, r8d
mov edx, 1
mov r9, rsi
call qword [rbx + 0x150]
mov r8d, 0x40
mov rdx, rsi
mov rcx, r15
call fcn.140041662
cmp dword [rbx + 0x268], ebp
je 0x1400392e1
mov ecx, 0xbe2
test ebp, ebp
jne 0x140039237
call qword [rbx + pe_nt_image_headers64]
jmp 0x1400392db
call qword [rbx + 0x98]
mov ecx, ebp
mov r12, qword [rbx + 0x38]
call fcn.140025f2b
mov ecx, eax
call fcn.140035c55
mov ecx, ebp
mov dword [rsp + 0x3c], eax
call fcn.140025f17
mov ecx, eax
call fcn.140035c55
mov ecx, ebp
mov dword [rsp + 0x38], eax
call fcn.140025ef2
mov ecx, eax
call fcn.140035c55
mov ecx, ebp
mov esi, eax
call fcn.140025ede
mov edx, esi
mov ecx, eax
call fcn.140035c55
mov r9d, dword [rsp + 0x3c]
mov r8d, dword [rsp + 0x38]
mov ecx, eax
call r12
mov ecx, ebp
mov rsi, qword [rbx + 0x30]
mov r12d, 0x500
call fcn.140025f3f
dec eax
cmp eax, 4
ja 0x1400392b8
lea rdx, [0x14019e308]
movzx r12d, word [rdx + rax*2]
mov ecx, ebp
call fcn.140025f06
mov ecx, 0x500
dec eax
cmp eax, 4
ja 0x1400392d6
lea rdx, [0x14019e308]
movzx ecx, word [rdx + rax*2]
mov edx, r12d
call rsi
mov dword [rbx + 0x268], ebp
add rdi, qword [r13 + 8]
xor r9d, r9d
mov r8d, 0x1406
xor ecx, ecx
mov qword [rsp + 0x28], rdi
add rdi, 8
mov edx, 2
mov dword [rsp + 0x20], r14d
call qword [rbx + 0x160]
mov qword [rsp + 0x28], rdi
mov r9d, 1
mov r8d, 0x1401
mov dword [rsp + 0x20], r14d
mov edx, 4
mov ecx, 1
call qword [rbx + 0x160]
xor eax, eax
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret