Function at 0x5d0110
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x64
mov eax, dword [0x699fe8]
xor eax, esp
mov dword [esp + 0x60], eax
cmp dword [0x6aa008], 0
je 0x5d04b5
cmp dword [0x6a53a8], 0x10
mov eax, dword [0x6a5394]
jae 0x5d013e
mov eax, 0x6a5394
push esi
call fcn.005cc110
mov esi, eax
test esi, esi
jne 0x5d015a
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
cmp byte [0x69c3ae], 0
push edi
je 0x5d02d0
mov eax, dword [0x6aa008]
mov edi, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str._J2K_getVersion_0
push eax
mov byte [0x69c3ae], 0
call edi
mov ecx, dword [0x6aa008]
push str._J2K_Unlock_4
push ecx
mov dword [0x75b8a0], eax
call edi
mov edx, dword [0x6aa008]
push str._J2K_OpenCustom_8
push edx
mov dword [0x75b8a4], eax
call edi
mov dword [0x75b8a8], eax
mov eax, dword [0x6aa008]
push str._J2K_OpenFile_4
push eax
call edi
mov ecx, dword [0x6aa008]
push str._J2K_Close_4
push ecx
mov dword [0x75b8ac], eax
call edi
mov edx, dword [0x6aa008]
push str._J2K_GetInfo_16
push edx
mov dword [0x75b8b0], eax
call edi
mov dword [0x75b8b4], eax
mov eax, dword [0x6aa008]
push str._J2K_GetResolutionDimensions_16
push eax
call edi
mov ecx, dword [0x6aa008]
push str._J2K_Decode_20
push ecx
mov dword [0x75b8b8], eax
call edi
mov edx, dword [0x6aa008]
push str._J2K_getLastError_0
push edx
mov dword [0x75b8bc], eax
call edi
mov dword [0x75b8c0], eax
mov eax, dword [0x6aa008]
push str._J2K_getErrorStr_4
push eax
call edi
mov ecx, dword [0x75b8a0]
test ecx, ecx
mov dword [0x75b8c4], eax
je 0x5d032d
cmp dword [0x75b8a4], 0
je 0x5d032d
cmp dword [0x75b8a8], 0
je 0x5d032d
cmp dword [0x75b8ac], 0
je 0x5d032d
cmp dword [0x75b8b0], 0
je 0x5d032d
cmp dword [0x75b8b4], 0
je 0x5d032d
cmp dword [0x75b8b8], 0
je 0x5d032d
cmp dword [0x75b8bc], 0
je 0x5d032d
cmp dword [0x75b8c0], 0
je 0x5d032d
test eax, eax
je 0x5d032d
call ecx
cmp eax, 0x120000
jl 0x5d032d
cmp dword [0x6a538c], 0x10
mov eax, dword [0x6a5378]
jae 0x5d02c9
mov eax, 0x6a5378
push eax
call dword [0x75b8a4]
lea ecx, [esp + 0x1c]
push ecx
push esi
mov dword [esp + 0x28], 0x5d00e0
mov dword [esp + 0x24], 0x5d00c0
mov dword [esp + 0x2c], method.Sexy::Widget.virtual_24
call dword [0x75b8a8]
mov edi, eax
test edi, edi
jne 0x5d0345
call dword [0x75b8c0]
push eax
call dword [0x75b8c4]
push eax
lea ecx, [esp + 0x30]
call fcn.00404450
lea ecx, [esp + 0x2c]
call fcn.00404420
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
call fcn.005d0080
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
lea edx, [esp + 0x28]
push edx
lea eax, [esp + 0xc]
push eax
lea ecx, [esp + 0x14]
push ecx
push edi
call dword [0x75b8b4]
test eax, eax
jne 0x5d039c
lea edx, [esp + 8]
push edx
lea eax, [esp + 0x10]
push eax
push 0
push edi
call dword [0x75b8b8]
mov eax, dword [esp + 0xc]
imul eax, dword [esp + 8]
xor ecx, ecx
mov edx, 4
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.0060ae9b
add esp, 4
test eax, eax
mov dword [esp + 0x10], eax
jne 0x5d03b6
push edi
call dword [0x75b8b0]
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
mov eax, dword [str.bpp4_rl0]
mov ecx, dword [0x676284]
mov dx, word [0x676288]
mov dword [esp + 0x48], eax
mov al, byte [0x67628a]
mov dword [esp + 0x4c], ecx
mov byte [esp + 0x52], al
mov eax, dword [esp + 0xc]
mov ecx, eax
imul ecx, dword [esp + 8]
add ecx, ecx
mov word [esp + 0x50], dx
lea edx, [eax*4]
add ecx, ecx
lea eax, [esp + 0x18]
push eax
mov dword [esp + 0x18], ecx
lea ecx, [esp + 0x4c]
push ecx
mov dword [esp + 0x20], edx
lea edx, [esp + 0x1c]
push edx
lea eax, [esp + 0x1c]
push eax
push edi
call dword [0x75b8bc]
test eax, eax
push edi
je 0x5d0442
call dword [0x75b8b0]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.0061c19f
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
call dword [0x75b8b0]
push 0x10
call fcn.0061c130
add esp, 4
test eax, eax
je 0x5d045f
call fcn.005cc250
mov edi, eax
jmp 0x5d0461
xor edi, edi
mov edx, dword [esp + 0x10]
mov dword [edi + 0xc], edx
mov eax, dword [esp + 0xc]
mov dword [edi + 4], eax
mov ecx, dword [esp + 8]
mov eax, edx
mov edx, dword [edi + 4]
mov dword [edi + 8], ecx
imul edx, dword [esp + 8]
lea ecx, [eax + edx*4]
cmp eax, ecx
je 0x5d049d
jmp 0x5d0490
or dword [eax], 0xff000000
add eax, 4
cmp eax, ecx
jne 0x5d0490
call fcn.005cc170
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.0061efd1
add esp, 0x64
ret
mov ecx, dword [esp + 0x60]
xor ecx, esp
xor eax, eax
call fcn.0061efd1
add esp, 0x64
ret