Function at 0x4e69c0
Capabilities:
Link many functions at runtime

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x64
mov eax, dword [0x6396a8]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [0x640880], 0
mov eax, dword [ebp + 8]
je 0x4e6d34
cmp dword [eax + 0x18], 0x10
jb 0x4e69eb
mov eax, dword [eax + 4]
jmp 0x4e69ee
add eax, 4
push esi
call fcn.004e52e0
mov esi, eax
test esi, esi
jne 0x4e6a09
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret
cmp byte [0x63e3e5], 0
push edi
je 0x4e6b77
mov eax, dword [0x640880]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._J2K_getVersion_0
push eax
mov byte [0x63e3e5], 0
call edi
mov ecx, dword [0x640880]
push str._J2K_Unlock_4
push ecx
mov dword [0x6754a0], eax
call edi
mov edx, dword [0x640880]
push str._J2K_OpenCustom_8
push edx
mov dword [0x6754a4], eax
call edi
mov dword [0x6754a8], eax
mov eax, dword [0x640880]
push str._J2K_OpenFile_4
push eax
call edi
mov ecx, dword [0x640880]
push str._J2K_Close_4
push ecx
mov dword [0x6754ac], eax
call edi
mov edx, dword [0x640880]
push str._J2K_GetInfo_16
push edx
mov dword [0x6754b0], eax
call edi
mov dword [0x6754b4], eax
mov eax, dword [0x640880]
push str._J2K_GetResolutionDimensions_16
push eax
call edi
mov ecx, dword [0x640880]
push str._J2K_Decode_20
push ecx
mov dword [0x6754b8], eax
call edi
mov edx, dword [0x640880]
push str._J2K_getLastError_0
push edx
mov dword [0x6754bc], eax
call edi
mov dword [0x6754c0], eax
mov eax, dword [0x640880]
push str._J2K_getErrorStr_4
push eax
call edi
mov ecx, dword [0x6754a0]
test ecx, ecx
mov dword [0x6754c4], eax
je 0x4e6bcd
cmp dword [0x6754a4], 0
je 0x4e6bcd
cmp dword [0x6754a8], 0
je 0x4e6bcd
cmp dword [0x6754ac], 0
je 0x4e6bcd
cmp dword [0x6754b0], 0
je 0x4e6bcd
cmp dword [0x6754b4], 0
je 0x4e6bcd
cmp dword [0x6754b8], 0
je 0x4e6bcd
cmp dword [0x6754bc], 0
je 0x4e6bcd
cmp dword [0x6754c0], 0
je 0x4e6bcd
test eax, eax
je 0x4e6bcd
call ecx
cmp eax, 0x120000
jl 0x4e6bcd
cmp dword [0x63de28], 0x10
mov eax, dword [0x63de14]
jae 0x4e6b70
mov eax, 0x63de14
push eax
call dword [0x6754a4]
lea ecx, [ebp - 0x60]
push ecx
push esi
mov dword [ebp - 0x5c], 0x4e6990
mov dword [ebp - 0x60], 0x4e6970
mov dword [ebp - 0x58], fcn.0045f300
call dword [0x6754a8]
mov edi, eax
test edi, edi
jne 0x4e6be4
call dword [0x6754c0]
push eax
call dword [0x6754c4]
push eax
lea ecx, [ebp - 0x40]
call fcn.00438a30
lea ecx, [ebp - 0x40]
call fcn.00525310
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret
call fcn.004e6950
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
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 [0x6754b4]
test eax, eax
jne 0x4e6c33
lea edx, [ebp - 0x44]
push edx
lea eax, [ebp - 0x48]
push eax
push 0
push edi
call dword [0x6754b8]
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.005b25e7
add esp, 4
test eax, eax
mov dword [ebp - 0x4c], eax
jne 0x4e6c4c
push edi
call dword [0x6754b0]
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret
mov eax, dword [str.bpp4_rl0]
mov ecx, dword [0x6107b4]
mov dx, word [0x6107b8]
mov dword [ebp - 0x24], eax
mov al, byte [0x6107ba]
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 [0x6754bc]
test eax, eax
push edi
je 0x4e6cca
call dword [0x6754b0]
mov ecx, dword [ebp - 0x4c]
push ecx
call fcn.005b39bc
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret
call dword [0x6754b0]
push 0x10
call fcn.005b2b20
add esp, 4
test eax, eax
je 0x4e6ce9
mov ecx, eax
call fcn.004e5420
mov edi, eax
jmp 0x4e6ceb
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 0x4e6d1d
lea ecx, [ecx]
or dword [eax], 0xff000000
add eax, 4
cmp eax, ecx
jne 0x4e6d10
call fcn.004e5340
mov eax, edi
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
xor ecx, ebp
xor eax, eax
call fcn.005b2f9b
mov esp, ebp
pop ebp
ret