Function at 0x4ef5a0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x5d5de8]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x5dd028], 0
mov eax, dword [ebp + 8]
je 0x4ef914
cmp dword [eax + 0x18], 0x10
jb 0x4ef5cb
mov eax, dword [eax + 4]
jmp 0x4ef5ce
add eax, 4
push esi
call fcn.004edeb0
mov esi, eax
test esi, esi
jne 0x4ef5e9
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
cmp byte [0x5dac5d], 0
push edi
je 0x4ef757
mov eax, dword [0x5dd028]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._J2K_getVersion_0
push eax
mov byte [0x5dac5d], 0
call edi
mov ecx, dword [0x5dd028]
push str._J2K_Unlock_4
push ecx
mov dword [0x611c30], eax
call edi
mov edx, dword [0x5dd028]
push str._J2K_OpenCustom_8
push edx
mov dword [0x611c34], eax
call edi
mov dword [0x611c38], eax
mov eax, dword [0x5dd028]
push str._J2K_OpenFile_4
push eax
call edi
mov ecx, dword [0x5dd028]
push str._J2K_Close_4
push ecx
mov dword [0x611c3c], eax
call edi
mov edx, dword [0x5dd028]
push str._J2K_GetInfo_16
push edx
mov dword [0x611c40], eax
call edi
mov dword [0x611c44], eax
mov eax, dword [0x5dd028]
push str._J2K_GetResolutionDimensions_16
push eax
call edi
mov ecx, dword [0x5dd028]
push str._J2K_Decode_20
push ecx
mov dword [0x611c48], eax
call edi
mov edx, dword [0x5dd028]
push str._J2K_getLastError_0
push edx
mov dword [0x611c4c], eax
call edi
mov dword [0x611c50], eax
mov eax, dword [0x5dd028]
push str._J2K_getErrorStr_4
push eax
call edi
mov ecx, dword [0x611c30]
test ecx, ecx
mov dword [0x611c54], eax
je 0x4ef7ad
cmp dword [0x611c34], 0
je 0x4ef7ad
cmp dword [0x611c38], 0
je 0x4ef7ad
cmp dword [0x611c3c], 0
je 0x4ef7ad
cmp dword [0x611c40], 0
je 0x4ef7ad
cmp dword [0x611c44], 0
je 0x4ef7ad
cmp dword [0x611c48], 0
je 0x4ef7ad
cmp dword [0x611c4c], 0
je 0x4ef7ad
cmp dword [0x611c50], 0
je 0x4ef7ad
test eax, eax
je 0x4ef7ad
call ecx
cmp eax, 0x120000
jl 0x4ef7ad
cmp dword [0x5da558], 0x10
mov eax, dword [0x5da544]
jae 0x4ef750
mov eax, 0x5da544
push eax
call dword [0x611c34]
lea ecx, [ebp - 0x60]
push ecx
push esi
mov dword [ebp - 0x5c], 0x4ef570
mov dword [ebp - 0x60], 0x4ef550
mov dword [ebp - 0x58], fcn.00524a10
call dword [0x611c38]
mov edi, eax
test edi, edi
jne 0x4ef7c4
call dword [0x611c50]
push eax
call dword [0x611c54]
push eax
lea ecx, [ebp - 0x40]
call fcn.00438950
lea ecx, [ebp - 0x40]
call fcn.004389f0
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
call fcn.004ef530
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
lea edx, [ebp - 0x64]
push edx
lea eax, [ebp - 0x44]
push eax
lea ecx, [ebp - 0x48]
push ecx
push edi
call dword [0x611c44]
test eax, eax
jne 0x4ef813
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x48]
push eax
push 0
push edi
call dword [0x611c48]
mov eax, dword [ebp - 0x48]
imul eax, dword [ebp - 0x44]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00568c31
add esp, 4
test eax, eax
mov dword [ebp - 0x4c], eax
jne 0x4ef82c
push edi
call dword [0x611c40]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
mov eax, dword [str.bpp4_rl0]
mov ecx, dword [0x5b7f78]
mov dx, word [0x5b7f7c]
mov dword [ebp - 0x24], eax
mov al, byte [0x5b7f7e]
mov dword [ebp - 0x20], ecx
mov byte [ebp - 0x1a], al
mov eax, dword [ebp - 0x48]
mov ecx, eax
imul ecx, dword [ebp - 0x44]
add ecx, ecx
mov word [ebp - 0x1c], dx
lea edx, [eax*4]
add ecx, ecx
lea eax, [ebp - 0x54]
push eax
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x24]
push ecx
mov dword [ebp - 0x54], edx
lea edx, [ebp - 0x50]
push edx
lea eax, [ebp - 0x4c]
push eax
push edi
call dword [0x611c4c]
test eax, eax
push edi
je 0x4ef8aa
call dword [0x611c40]
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.0056a975
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
call dword [0x611c40]
push 0x10
call fcn.0056980a
add esp, 4
test eax, eax
je 0x4ef8c7
call fcn.004edff0
mov edi, eax
jmp 0x4ef8c9
xor edi, edi
mov edx, dword [ebp - 0x4c]
mov dword [edi + 0xc], edx
mov eax, dword [ebp - 0x48]
mov dword [edi + 4], eax
mov ecx, dword [ebp - 0x44]
mov eax, edx
mov edx, dword [edi + 4]
mov dword [edi + 8], ecx
imul edx, dword [ebp - 0x44]
lea ecx, [eax + edx*4]
cmp eax, ecx
je 0x4ef8fd
jmp 0x4ef8f0
or dword [eax], 0xff000000
add eax, 4
cmp eax, ecx
jne 0x4ef8f0
call fcn.004edf10
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005697e2
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.005697e2
mov esp, ebp
pop ebp
ret