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

Disassembly:
mov r11, rsp
push rbx
push rbp
push rdi
push r13
push r14
sub rsp, 0xd0
mov rax, qword [0x1403749c0]
xor rax, rsp
mov qword [rsp + 0xb0], rax
xor r14d, r14d
mov dword [rsp + 0x4c], r8d
xor eax, eax
mov word [rsp + 0x24], 0x4d42
mov dword [rsp + 0x28], r14d
xorps xmm0, xmm0
mov dword [rsp + 0x2c], r14d
mov rbx, rdx
mov dword [rsp + 0x30], r14d
mov r13, rcx
mov dword [rsp + 0x34], r14d
mov edi, r14d
mov dword [rsp + 0x38], r14d
mov ebp, r14d
mov dword [r11 - 0x50], eax
movups xmmword [r11 - 0x70], xmm0
movups xmmword [r11 - 0x60], xmm0
test rdx, rdx
je 0x14008836a
mov rcx, qword [rcx + 8]
movzx edx, byte [rcx + 0x10]
cmp dl, 8
jb 0x140087e97
cmp dword [rcx + 0x20], eax
jne 0x140087e92
mov rax, qword [r13 + 0x50]
test dword [rax + 0x68], 0x100
je 0x140087e97
mov edi, 1
mov qword [rsp + 0x110], rsi
cmp qword [rcx + 8], rbp
je 0x140087ec7
test edi, edi
jne 0x140087ec7
cmp dl, 8
jne 0x140087eb6
mov rsi, r13
jmp 0x140087f46
lea rcx, str._d_bpp_BMP_files_not_supported
call fcn.140052570
jmp 0x140088339
cmp dl, 0x18
jne 0x140087ef0
test edi, edi
jne 0x140087ef0
cmp dword [rcx + 0x14], 0xff0000
jne 0x140087ef0
cmp dword [rcx + 0x18], 0xff00
jne 0x140087ef0
cmp dword [rcx + 0x1c], 0xff
jne 0x140087ef0
mov rsi, r13
jmp 0x140087f46
mov edx, 0x16362004
lea rcx, [rsp + 0x50]
mov eax, 0x17401803
test edi, edi
cmove edx, eax
call fcn.14007b2b0
xor r8d, r8d
lea rdx, [rsp + 0x50]
mov rcx, r13
call fcn.140085b40
mov rsi, rax
test rax, rax
jne 0x140087f32
movzx edx, byte [rsp + 0x60]
lea rcx, str.Couldnt_convert_image_to__d_bpp
call fcn.140052570
test edi, edi
je 0x140087f46
xor edx, edx
lea rcx, str.SDL_BMP_SAVE_LEGACY_FORMAT
call fcn.14006d340
mov ebp, eax
test rsi, rsi
je 0x140088339
mov rcx, rsi
call fcn.140086660
test eax, eax
jne 0x140088339
mov rcx, qword [rsi + 8]
mov qword [rsp + 0xc8], r12
mov qword [rsp + 0xc0], r15
movzx eax, byte [rcx + 0x11]
mov rcx, rbx
imul eax, dword [rsi + 0x10]
mov dword [rsp + 0x48], eax
call fcn.140054c20
mov r12, rax
call fcn.140052470
mov r9d, 1
lea rdx, [rsp + 0x24]
mov rcx, rbx
lea r8d, [r9 + 1]
call fcn.140054c40
xor edx, edx
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e40
xor edx, edx
mov rcx, rbx
call fcn.140054e40
xor edx, edx
mov rcx, rbx
call fcn.140054e70
mov ecx, dword [rsi + 0x14]
mov edx, 0x28
mov eax, dword [rsi + 0x10]
mov r15d, r14d
mov dword [rsp + 0x40], ecx
imul ecx, dword [rsi + 0x18]
mov dword [rsp + 0x3c], eax
mov rax, qword [rsi + 8]
mov dword [rsp + 0x44], ecx
mov rcx, qword [rax + 8]
movzx r8d, byte [rax + 0x10]
mov word [rsp + 0x20], r8w
test rcx, rcx
je 0x140088007
mov r14d, dword [rcx]
test edi, edi
je 0x14008803e
test ebp, ebp
jne 0x14008803e
lea edx, [rbp + 0x6c]
mov dword [rsp + 0x28], 0xff0000
lea r15d, [rbp + 3]
mov dword [rsp + 0x2c], 0xff00
mov dword [rsp + 0x30], 0xff
mov dword [rsp + 0x34], 0xff000000
mov dword [rsp + 0x38], 0x57696e20
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x3c]
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x40]
mov rcx, rbx
call fcn.140054e70
mov edx, 1
mov rcx, rbx
call fcn.140054e40
movzx edx, word [rsp + 0x20]
mov rcx, rbx
call fcn.140054e40
mov edx, r15d
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x44]
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e70
mov edx, r14d
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e70
test edi, edi
je 0x140088148
test ebp, ebp
jne 0x140088148
mov edx, dword [rsp + 0x28]
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x2c]
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x30]
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x34]
mov rcx, rbx
call fcn.140054e70
mov edx, dword [rsp + 0x38]
mov rcx, rbx
call fcn.140054e70
xor r15d, r15d
mov edi, r15d
nop word [rax + rax]
mov edx, dword [rsp + rdi*4 + 0x88]
mov rcx, rbx
call fcn.140054e70
inc rdi
cmp rdi, 9
jl 0x140088110
xor edx, edx
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e70
xor edx, edx
mov rcx, rbx
call fcn.140054e70
jmp 0x14008814b
xor r15d, r15d
mov rax, qword [rsi + 8]
mov rcx, qword [rax + 8]
test rcx, rcx
je 0x1400881cd
mov eax, dword [rcx]
mov rdi, qword [rcx + 8]
test eax, eax
jle 0x1400881cd
inc rdi
mov ebp, eax
nop word [rax + rax]
mov r9d, 1
lea rdx, [rdi + 1]
mov r8d, r9d
mov rcx, rbx
call fcn.140054c40
mov r9d, 1
mov rdx, rdi
mov r8d, r9d
mov rcx, rbx
call fcn.140054c40
mov r9d, 1
lea rdx, [rdi - 1]
mov r8d, r9d
mov rcx, rbx
call fcn.140054c40
mov r9d, 1
lea rdx, [rdi + 2]
mov r8d, r9d
mov rcx, rbx
call fcn.140054c40
add rdi, 4
sub rbp, 1
jne 0x140088170
mov rcx, rbx
call fcn.140054c20
mov rdi, rax
lea rdx, [r12 + 0xa]
xor r8d, r8d
mov rcx, rbx
sub edi, r12d
call fcn.140054c00
test rax, rax
jns 0x1400881fa
mov ecx, 3
call fcn.140052490
mov edx, edi
mov rcx, rbx
call fcn.140054e70
mov edx, edi
xor r8d, r8d
add rdx, r12
mov rcx, rbx
call fcn.140054c00
test rax, rax
jns 0x140088223
mov ecx, 3
call fcn.140052490
mov eax, dword [rsi + 0x18]
imul eax, dword [rsi + 0x14]
mov rcx, qword [rsi + 0x20]
movsxd rdx, dword [rsp + 0x48]
movsxd rbp, eax
mov eax, edx
add rbp, rcx
and eax, 0x80000003
jge 0x140088249
dec eax
or eax, 0xfffffffc
inc eax
mov r14d, 4
sub r14d, eax
test eax, eax
cmove r14d, r15d
cmp rbp, rcx
jbe 0x1400882be
mov r15, rdx
movsxd rax, dword [rsi + 0x18]
mov r9, r15
sub rbp, rax
mov r8d, 1
mov rdx, rbp
mov rcx, rbx
call fcn.140054c40
cmp rax, r15
jne 0x1400882b4
test r14d, r14d
je 0x1400882ac
mov byte [rsp + 0x20], 0
jle 0x1400882ac
mov edi, r14d
nop
mov r9d, 1
lea rdx, [rsp + 0x20]
mov r8d, r9d
mov rcx, rbx
call fcn.140054c40
sub rdi, 1
jne 0x140088290
cmp rbp, qword [rsi + 0x20]
ja 0x140088260
jmp 0x1400882be
mov ecx, 2
call fcn.140052490
mov rcx, rbx
call fcn.140054c20
mov rdi, rax
lea rdx, [r12 + 2]
xor r8d, r8d
mov rcx, rbx
sub edi, r12d
call fcn.140054c00
mov r15, qword [rsp + 0xc0]
test rax, rax
jns 0x1400882f3
mov ecx, 3
call fcn.140052490
mov edx, edi
mov rcx, rbx
call fcn.140054e70
mov edx, edi
xor r8d, r8d
add rdx, r12
mov rcx, rbx
call fcn.140054c00
mov r12, qword [rsp + 0xc8]
test rax, rax
jns 0x140088324
mov ecx, 3
call fcn.140052490
mov rcx, rsi
call fcn.140087280
cmp rsi, r13
je 0x140088339
mov rcx, rsi
call fcn.140086440
cmp dword [rsp + 0x4c], 0
mov rsi, qword [rsp + 0x110]
je 0x140088350
mov rcx, rbx
call fcn.140054bd0
call fcn.140052540
mov rcx, rax
lea rdx, [0x140346534]
call fcn.1400533a0
neg eax
sbb eax, eax
jmp 0x14008836f
mov eax, 0xffffffff
mov rcx, qword [rsp + 0xb0]
xor rcx, rsp
call fcn.140158fa0
add rsp, 0xd0
pop r14
pop r13
pop rdi
pop rbp
pop rbx
ret