Function at 0x4c1520
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x4a9c
call fcn.005970f0
mov eax, dword [0x641a90]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
mov ebx, dword [ebp + 8]
push edi
mov edi, dword [ebp + 0xc]
push 1
push str.openjp2
mov dword [ebp - 0x4a98], edi
call fcn.00452200
add esp, 8
mov dword [ebp - 0x4a50], eax
test eax, eax
jne 0x4c1573
pop edi
mov eax, 2
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._opj_stream_create_8
push eax
call esi
push str._opj_stream_set_user_data_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a58], eax
call esi
push str._opj_stream_set_write_function_8
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a5c], eax
call esi
push str._opj_stream_set_seek_function_8
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a54], eax
call esi
push str._opj_stream_set_skip_function_8
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a9c], eax
call esi
push str._opj_set_info_handler_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a8c], eax
call esi
push str._opj_set_warning_handler_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a94], eax
call esi
push str._opj_set_error_handler_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a70], eax
call esi
push str._opj_image_destroy_4
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a78], eax
call esi
push str._opj_stream_destroy_4
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a84], eax
call esi
push str._opj_destroy_codec_4
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a68], eax
call esi
push str._opj_set_default_encoder_parameters_4
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a6c], eax
call esi
push str._opj_create_compress_4
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a60], eax
call esi
push str._opj_encode_8
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a64], eax
call esi
push str._opj_end_compress_8
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a74], eax
call esi
push str._opj_setup_encoder_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a7c], eax
call esi
push str._opj_image_create_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a90], eax
call esi
push str._opj_start_compress_12
push dword [ebp - 0x4a50]
mov dword [ebp - 0x4a80], eax
call esi
mov esi, dword [ebp - 0x4a60]
mov dword [ebp - 0x4a88], eax
test esi, esi
jne 0x4c16f5
push dword [ebp - 0x4a50]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esi + 2]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0x138]
push eax
call fcn.00458dd0
movzx eax, word [0x5d8d30]
add esp, 4
movq xmm0, qword [str.JPEG_2000]
mov ecx, 1
mov word [ebp - 0x10c], ax
movzx eax, word [edi + 0x28]
mov word [ebp - 0x12a], ax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x120], eax
xor eax, eax
mov word [ebp - 0x11c], ax
lea eax, [ebp - 0x4a4c]
push eax
movq qword [ebp - 0x114], xmm0
mov dword [ebp - 0x138], 0
mov dword [ebp - 0x134], 0x10000
mov word [ebp - 0x12c], cx
call esi
push 2
call dword [ebp - 0x4a64]
push 0
mov esi, eax
push 0x400
mov dword [ebp - 0x4a60], esi
call dword [ebp - 0x4a58]
push 0
push ebx
mov ebx, eax
mov dword [ebp - 0x4a58], eax
push ebx
call dword [ebp - 0x4a5c]
push 0x4c14a0
push ebx
call dword [ebp - 0x4a54]
push 0x47e320
push ebx
call dword [ebp - 0x4a9c]
push 0x4c1460
push ebx
call dword [ebp - 0x4a8c]
push 0
push fcn.004d9180
push esi
call dword [ebp - 0x4a94]
push 0
push fcn.004d9180
push esi
call dword [ebp - 0x4a70]
push 0
push fcn.004d9180
push esi
call dword [ebp - 0x4a78]
lea eax, [ebp - 0x138]
push eax
mov eax, dword [edi]
push edi
call eax
movzx esi, ax
add esp, 8
test si, si
jne 0x4c1c09
movsx ebx, word [edi + 0x40]
lea eax, [ebp - 0x94]
push 0x90
push 0
push eax
mov dword [ebp - 0x4a64], ebx
call fcn.00595760
add esp, 0xc
test ebx, ebx
jle 0x4c1873
mov edx, dword [edi + 0x2c]
lea eax, [ebp - 0x78]
mov esi, dword [edi + 0x30]
mov ecx, ebx
mov ebx, dword [ebp - 0x33c]
mov edi, dword [ebp - 0x340]
jmp 0x4c1840
mov dword [eax - 4], 8
lea eax, [eax + 0x24]
mov dword [eax - 0x24], 8
mov dword [eax - 0x20], 0
mov dword [eax - 0x40], edi
mov dword [eax - 0x3c], ebx
mov dword [eax - 0x38], edx
mov dword [eax - 0x34], esi
dec ecx
jne 0x4c1840
mov edi, dword [ebp - 0x4a98]
mov ebx, dword [ebp - 0x4a64]
xor eax, eax
cmp word [edi + 0x24], 2
sete al
inc eax
push eax
lea eax, [ebp - 0x94]
push eax
push ebx
call dword [ebp - 0x4a80]
mov esi, eax
mov dword [ebp - 0x4a5c], esi
test esi, esi
jne 0x4c18d1
push dword [ebp - 0x4a58]
call dword [ebp - 0x4a68]
push dword [ebp - 0x4a60]
call dword [ebp - 0x4a6c]
push dword [ebp - 0x4a50]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea eax, [esi + 1]
pop esi
pop edi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005920c1
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 0x348]
mov dword [esi], ecx
mov eax, dword [ebp - 0x344]
mov dword [esi + 4], eax
mov eax, dword [edi + 0x2c]
dec eax
imul eax, dword [ebp - 0x340]
inc eax
test ecx, ecx
je 0x4c18f4
add eax, ecx
mov ecx, dword [esi + 4]
mov dword [esi + 8], eax
mov eax, dword [edi + 0x30]
dec eax
imul eax, dword [ebp - 0x33c]
inc eax
test ecx, ecx
je 0x4c190c
add eax, ecx
xor ebx, ebx
mov dword [esi + 0xc], eax
mov dword [ebp - 0x4a54], ebx
cmp dword [edi + 0x30], ebx
jle 0x4c1a32
push 1
push ebx
push edi
call fcn.00459620
mov edx, dword [edi + 0x2c]
add esp, 0xc
cmp word [edi + 0x24], 2
jne 0x4c196b
xor esi, esi
test edx, edx
jle 0x4c1a1c
mov eax, dword [ebp - 0x130]
imul edx, ebx
movzx ecx, byte [eax + esi]
mov eax, dword [ebp - 0x4a5c]
add edx, esi
inc esi
mov eax, dword [eax + 0x18]
mov eax, dword [eax + 0x2c]
mov dword [eax + edx*4], ecx
mov edx, dword [edi + 0x2c]
cmp esi, edx
jl 0x4c1940
jmp 0x4c1a1c
mov esi, dword [ebp - 0x130]
xor ebx, ebx
test edx, edx
jle 0x4c1a16
jmp 0x4c1980
mov eax, dword [ebp - 0x4a5c]
imul edx, dword [ebp - 0x4a54]
movzx ecx, byte [esi]
mov eax, dword [eax + 0x18]
add edx, ebx
mov eax, dword [eax + 0x2c]
mov dword [eax + edx*4], ecx
mov ecx, dword [edi + 0x2c]
imul ecx, dword [ebp - 0x4a54]
mov eax, dword [ebp - 0x4a5c]
movzx edx, byte [esi + 1]
mov eax, dword [eax + 0x18]
add ecx, ebx
mov eax, dword [eax + 0x60]
mov dword [eax + ecx*4], edx
mov eax, dword [ebp - 0x4a5c]
mov ecx, dword [edi + 0x2c]
imul ecx, dword [ebp - 0x4a54]
movzx edx, byte [esi + 2]
add esi, 3
mov eax, dword [eax + 0x18]
add ecx, ebx
cmp dword [ebp - 0x4a64], 4
mov eax, dword [eax + 0x94]
mov dword [eax + ecx*4], edx
jl 0x4c1a0a
mov eax, dword [ebp - 0x4a5c]
mov ecx, dword [edi + 0x2c]
imul ecx, dword [ebp - 0x4a54]
movzx edx, byte [esi]
mov eax, dword [eax + 0x18]
add ecx, ebx
inc esi
mov eax, dword [eax + 0xc8]
mov dword [eax + ecx*4], edx
mov edx, dword [edi + 0x2c]
inc ebx
cmp ebx, edx
jl 0x4c1980
mov ebx, dword [ebp - 0x4a54]
inc ebx
mov dword [ebp - 0x4a54], ebx
cmp ebx, dword [edi + 0x30]
jl 0x4c1920
mov esi, dword [ebp - 0x4a5c]
movzx eax, word [edi + 0xae]
cmp ax, 0x64
je 0x4c1b63
movzx ecx, word [edi + 0xca]
test cx, cx
jle 0x4c1a84
movsx eax, cx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov eax, dword [ebp - 0x3798]
movss dword [ebp + eax*4 - 0x3794], xmm0
mov eax, dword [ebp - 0x3798]
inc eax
mov dword [ebp - 0x4a38], 1
mov dword [ebp - 0x3798], eax
jmp 0x4c1b69
test ax, ax
cwde
jle 0x4c1abc
movd xmm0, eax
mov eax, dword [ebp - 0x3798]
cvtdq2ps xmm0, xmm0
movss dword [ebp + eax*4 - 0x3604], xmm0
mov eax, dword [ebp - 0x3798]
inc eax
mov dword [ebp - 0x4a30], 1
mov dword [ebp - 0x3798], eax
jmp 0x4c1b69
movd xmm2, dword [edi + 0x30]
mov ecx, 0x73
movd xmm0, dword [edi + 0x2c]
sub ecx, eax
mov eax, dword [edi + 0xcc]
cvtdq2pd xmm0, xmm0
movd xmm3, ecx
mov ecx, dword [ebp - 0x4a64]
cvtdq2pd xmm2, xmm2
cvtdq2pd xmm3, xmm3
mulsd xmm2, xmm0
movd xmm0, ecx
cvtdq2pd xmm0, xmm0
mulsd xmm2, xmm0
cmp eax, 1
jbe 0x4c1b17
shl eax, 0xa
movd xmm1, eax
cvtdq2pd xmm1, xmm1
shr eax, 0x1f
addsd xmm1, qword [eax*8 + 0x62d480]
jmp 0x4c1b4a
movsd xmm1, qword [0x5c3680]
mulsd xmm3, xmm3
imul eax, ecx, 0x8e
divsd xmm1, xmm3
sub eax, 0x8e
movd xmm0, eax
cvtdq2pd xmm0, xmm0
mulsd xmm1, xmm2
addsd xmm0, qword [0x5ddcc8]
addsd xmm1, xmm0
divsd xmm1, xmm2
movsd xmm0, qword [0x62d3c8]
divsd xmm0, xmm1
cvtpd2ps xmm0, xmm0
jmp 0x4c1a59
mov eax, dword [ebp - 0x3798]
test eax, eax
jne 0x4c1b87
mov dword [ebp - 0x3794], eax
mov dword [ebp - 0x3798], 1
mov dword [ebp - 0x4a38], 1
mov ebx, dword [ebp - 0x4a60]
lea eax, [ebp - 0x4a4c]
push esi
push eax
push ebx
call dword [ebp - 0x4a90]
push dword [ebp - 0x4a58]
cmp dword [esi + 0x10], 3
push esi
push ebx
sete byte [ebp - 0x14a]
call dword [ebp - 0x4a88]
test eax, eax
je 0x4c1be2
push dword [ebp - 0x4a58]
push ebx
call dword [ebp - 0x4a74]
test eax, eax
je 0x4c1be2
push dword [ebp - 0x4a58]
push ebx
call dword [ebp - 0x4a7c]
test eax, eax
je 0x4c1be2
mov ebx, 1
jmp 0x4c1be4
xor ebx, ebx
push esi
call dword [ebp - 0x4a84]
xor ecx, ecx
mov eax, 6
test ebx, ebx
push edi
cmovne eax, ecx
movzx esi, ax
call fcn.00454fa0
mov ebx, dword [ebp - 0x4a58]
add esp, 4
push ebx
call dword [ebp - 0x4a68]
push dword [ebp - 0x4a60]
call dword [ebp - 0x4a6c]
push dword [ebp - 0x4a50]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov ecx, dword [ebp - 4]
mov ax, si
pop esi
pop edi
xor ecx, ebp
pop ebx
call fcn.005920c1
mov esp, ebp
pop ebp
ret