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

Disassembly:
mov dword [rsp + 0x20], r9d
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xa8
mov qword [rsp + 0x78], 0
mov rax, qword [rsp + 0xc8]
cmp qword [rax + 8], 0
jne 0x1400bf416
xor r9d, r9d
mov r8, qword [rsp + 0xd0]
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc0]
call fcn.1400be8d0
test eax, eax
jne 0x1400bf384
xor eax, eax
jmp 0x1400bfa4c
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax]
shl eax, 2
mov dword [rsp + 0x58], eax
mov rcx, qword [rsp + 0xc8]
mov eax, dword [rcx + 4]
mov ecx, dword [rsp + 0x58]
mul ecx
mov eax, eax
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1402287e8
mov rcx, qword [rsp + 0xc8]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0xc8]
cmp qword [rax + 8], 0
jne 0x1400bf404
lea rcx, [0x1403a9478]
call fcn.1400b16d0
test eax, eax
je 0x1400bf3f1
mov qword [rsp + 0x68], 0
jmp 0x1400bf3fa
mov qword [rsp + 0x68], 0
mov rax, qword [rsp + 0x68]
jmp 0x1400bfa4c
mov rcx, qword [rsp + 0xc8]
call fcn.1400bf210
jmp 0x1400bf4f2
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x20]
and eax, 0x1c
sar eax, 2
cmp eax, 3
jne 0x1400bf4f2
mov rax, qword [rsp + 0xc8]
mov rax, qword [rax + 8]
mov qword [rsp + 0x78], rax
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax]
shl eax, 2
mov dword [rsp + 0x5c], eax
mov rcx, qword [rsp + 0xc8]
mov eax, dword [rcx + 4]
mov ecx, dword [rsp + 0x5c]
mul ecx
mov eax, eax
mov rcx, 0xffffffffffffffff
cmovo rax, rcx
mov rcx, rax
call fcn.1402287e8
mov rcx, qword [rsp + 0xc8]
mov qword [rcx + 8], rax
mov rax, qword [rsp + 0xc8]
cmp qword [rax + 8], 0
jne 0x1400bf4c1
lea rcx, [0x1403a9468]
call fcn.1400b16d0
test eax, eax
je 0x1400bf4ae
mov qword [rsp + 0x70], 0
jmp 0x1400bf4b7
mov qword [rsp + 0x70], 0
mov rax, qword [rsp + 0x70]
jmp 0x1400bfa4c
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov eax, dword [rax]
imul eax, dword [rcx + 4]
shl eax, 2
cdqe
mov rcx, qword [rsp + 0xc8]
mov rdi, qword [rcx + 8]
mov rsi, qword [rsp + 0x78]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov dword [rsp + 0x38], eax
cmp dword [rsp + 0x38], 0x21
je 0x1400bf961
cmp dword [rsp + 0x38], 0x2c
je 0x1400bf525
cmp dword [rsp + 0x38], 0x3b
je 0x1400bfa0c
jmp 0x1400bfa13
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2550
mov dword [rsp + 0x3c], eax
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2550
mov dword [rsp + 0x40], eax
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2550
mov dword [rsp + 0x44], eax
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2550
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x44]
mov ecx, dword [rsp + 0x3c]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0xc8]
cmp eax, dword [rcx]
jg 0x1400bf59a
mov eax, dword [rsp + 0x48]
mov ecx, dword [rsp + 0x40]
add ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0xc8]
cmp eax, dword [rcx + 4]
jle 0x1400bf5d1
lea rcx, str.bad_Image_Descriptor
call fcn.1400b16d0
test eax, eax
je 0x1400bf5b8
mov qword [rsp + 0x80], 0
jmp 0x1400bf5c4
mov qword [rsp + 0x80], 0
mov rax, qword [rsp + 0x80]
jmp 0x1400bfa4c
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax]
shl eax, 2
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4854], eax
mov eax, dword [rsp + 0x3c]
shl eax, 2
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x483c], eax
mov rax, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0x40]
imul ecx, dword [rax + 0x4854]
mov eax, ecx
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4840], eax
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x483c]
mov ecx, dword [rsp + 0x44]
lea eax, [rax + rcx*4]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4844], eax
mov rax, qword [rsp + 0xc8]
mov ecx, dword [rsp + 0x48]
imul ecx, dword [rax + 0x4854]
mov eax, ecx
mov rcx, qword [rsp + 0xc8]
add eax, dword [rcx + 0x4840]
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4848], eax
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov ecx, dword [rcx + 0x483c]
mov dword [rax + 0x484c], ecx
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov ecx, dword [rcx + 0x4840]
mov dword [rax + 0x4850], ecx
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4838], eax
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x4838]
and eax, 0x40
test eax, eax
je 0x1400bf713
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x4854]
shl eax, 3
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x4834], eax
mov rax, qword [rsp + 0xc8]
mov dword [rax + 0x4830], 3
jmp 0x1400bf741
mov rax, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc8]
mov ecx, dword [rcx + 0x4854]
mov dword [rax + 0x4834], ecx
mov rax, qword [rsp + 0xc8]
mov dword [rax + 0x4830], 0
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x4838]
and eax, 0x80
test eax, eax
je 0x1400bf7f3
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x20]
and eax, 1
test eax, eax
je 0x1400bf77f
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x1c]
mov dword [rsp + 0x4c], eax
jmp 0x1400bf787
mov dword [rsp + 0x4c], 0xffffffff
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x4838]
and eax, 7
mov ecx, 2
mov dword [rsp + 0x60], ecx
movzx ecx, al
mov eax, dword [rsp + 0x60]
shl eax, cl
mov rcx, qword [rsp + 0xc8]
add rcx, 0x424
mov r9d, dword [rsp + 0x4c]
mov r8d, eax
mov rdx, rcx
mov rcx, qword [rsp + 0xc0]
call fcn.1400be7e0
mov rax, qword [rsp + 0xc8]
add rax, 0x424
mov rcx, qword [rsp + 0xc8]
mov qword [rcx + 0x4828], rax
jmp 0x1400bf8e4
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x10]
and eax, 0x80
test eax, eax
je 0x1400bf8ad
mov dword [rsp + 0x34], 0
jmp 0x1400bf81f
mov eax, dword [rsp + 0x34]
inc eax
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0x100
jge 0x1400bf84a
movsxd rax, dword [rsp + 0x34]
mov rcx, qword [rsp + 0xc8]
lea rax, [rcx + rax*4 + 0x24]
mov ecx, 1
imul rcx, rcx, 3
mov byte [rax + rcx], 0xff
jmp 0x1400bf815
mov rax, qword [rsp + 0xc8]
cmp dword [rax + 0x1c], 0
jl 0x1400bf890
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 0x20]
and eax, 1
test eax, eax
je 0x1400bf890
mov rax, qword [rsp + 0xc8]
movsxd rax, dword [rax + 0x1c]
mov rcx, qword [rsp + 0xc8]
lea rax, [rcx + rax*4 + 0x24]
mov ecx, 1
imul rcx, rcx, 3
mov byte [rax + rcx], 0
mov rax, qword [rsp + 0xc8]
add rax, 0x24
mov rcx, qword [rsp + 0xc8]
mov qword [rcx + 0x4828], rax
jmp 0x1400bf8e4
lea rcx, str.missing_color_table
call fcn.1400b16d0
test eax, eax
je 0x1400bf8cb
mov qword [rsp + 0x88], 0
jmp 0x1400bf8d7
mov qword [rsp + 0x88], 0
mov rax, qword [rsp + 0x88]
jmp 0x1400bfa4c
mov rdx, qword [rsp + 0xc8]
mov rcx, qword [rsp + 0xc0]
call fcn.1400bedc0
mov qword [rsp + 0x50], rax
cmp qword [rsp + 0x50], 0
jne 0x1400bf90d
xor eax, eax
jmp 0x1400bfa4c
cmp dword [rsp + 0xd8], 0
je 0x1400bf957
cmp dword [rsp + 0xd8], 4
je 0x1400bf957
mov rax, qword [rsp + 0xc8]
mov eax, dword [rax + 4]
mov dword [rsp + 0x20], eax
mov rax, qword [rsp + 0xc8]
mov r9d, dword [rax]
mov r8d, dword [rsp + 0xd8]
mov edx, 4
mov rcx, qword [rsp + 0x50]
call fcn.1400b2600
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x50]
jmp 0x1400bfa4c
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
cmp eax, 0xf9
jne 0x1400bf9df
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 4
jne 0x1400bf9cc
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x20], eax
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2550
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov rcx, qword [rsp + 0xc8]
mov dword [rcx + 0x1c], eax
jmp 0x1400bf9df
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0xc0]
call fcn.1400b22d0
jmp 0x1400bfa47
mov rcx, qword [rsp + 0xc0]
call fcn.1400b2180
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 0
je 0x1400bfa0a
mov edx, dword [rsp + 0x30]
mov rcx, qword [rsp + 0xc0]
call fcn.1400b22d0
jmp 0x1400bf9df
jmp 0x1400bfa47
mov eax, 1
jmp 0x1400bfa4c
lea rcx, str.unknown_code
call fcn.1400b16d0
test eax, eax
je 0x1400bfa31
mov qword [rsp + 0x90], 0
jmp 0x1400bfa3d
mov qword [rsp + 0x90], 0
mov rax, qword [rsp + 0x90]
jmp 0x1400bfa4c
jmp 0x1400bf4f2
add rsp, 0xa8
pop rdi
pop rsi
ret