Function at 0x478830
Capabilities:
Link many functions at runtime

Disassembly:
sub esp, 0x64
mov eax, dword [0x867e6c]
xor eax, esp
mov dword [esp + 0x60], eax
cmp dword [0x88b150], 0
je 0x478bf5
cmp dword [0x87c320], 0x10
mov ecx, dword [0x87c30c]
jae 0x47885f
mov ecx, 0x87c30c
push esi
call fcn.00467390
test eax, eax
je 0x478884
mov esi, dword [esp + 0x6c]
mov eax, dword [0x88c4a0]
mov edx, dword [eax]
push esi
push 0x81da84
push ecx
mov ecx, eax
mov eax, dword [edx + 8]
call eax
jmp 0x478889
call fcn.00472e10
mov esi, eax
test esi, esi
jne 0x47889f
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
cmp byte [0x86b2a7], 0
push edi
je 0x478a16
mov ecx, dword [0x88b150]
mov edi, dword [sym.imp.kernel32.dll_GetProcAddress]
push str._J2K_getVersion_0
push ecx
mov byte [0x86b2a7], 0
call edi
mov edx, dword [0x88b150]
push str._J2K_Unlock_4
push edx
mov dword [0x8c0b50], eax
call edi
mov dword [0x8c0b54], eax
mov eax, dword [0x88b150]
push str._J2K_OpenCustom_8
push eax
call edi
mov ecx, dword [0x88b150]
push str._J2K_OpenFile_4
push ecx
mov dword [0x8c0b58], eax
call edi
mov edx, dword [0x88b150]
push str._J2K_Close_4
push edx
mov dword [0x8c0b5c], eax
call edi
mov dword [0x8c0b60], eax
mov eax, dword [0x88b150]
push str._J2K_GetInfo_16
push eax
call edi
mov ecx, dword [0x88b150]
push str._J2K_GetResolutionDimensions_16
push ecx
mov dword [0x8c0b64], eax
call edi
mov edx, dword [0x88b150]
push str._J2K_Decode_20
push edx
mov dword [0x8c0b68], eax
call edi
mov dword [0x8c0b6c], eax
mov eax, dword [0x88b150]
push str._J2K_getLastError_0
push eax
call edi
mov ecx, dword [0x88b150]
push str._J2K_getErrorStr_4
push ecx
mov dword [0x8c0b70], eax
call edi
mov ecx, dword [0x8c0b50]
mov dword [0x8c0b74], eax
test ecx, ecx
je 0x478a73
cmp dword [0x8c0b54], 0
je 0x478a73
cmp dword [0x8c0b58], 0
je 0x478a73
cmp dword [0x8c0b5c], 0
je 0x478a73
cmp dword [0x8c0b60], 0
je 0x478a73
cmp dword [0x8c0b64], 0
je 0x478a73
cmp dword [0x8c0b68], 0
je 0x478a73
cmp dword [0x8c0b6c], 0
je 0x478a73
cmp dword [0x8c0b70], 0
je 0x478a73
test eax, eax
je 0x478a73
call ecx
cmp eax, 0x120000
jl 0x478a73
cmp dword [0x87c304], 0x10
mov eax, dword [0x87c2f0]
jae 0x478a0f
mov eax, 0x87c2f0
push eax
call dword [0x8c0b54]
lea edx, [esp + 0x1c]
push edx
push esi
mov dword [esp + 0x28], 0x478810
mov dword [esp + 0x24], 0x4787d0
mov dword [esp + 0x2c], method.Sexy::Background.virtual_24
call dword [0x8c0b58]
mov edi, eax
test edi, edi
jne 0x478a8b
call dword [0x8c0b70]
push eax
call dword [0x8c0b74]
push eax
lea ecx, [esp + 0x30]
call fcn.00401280
lea ecx, [esp + 0x2c]
call fcn.004012f0
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
call fcn.00478790
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
lea eax, [esp + 0x28]
push eax
lea ecx, [esp + 0xc]
push ecx
lea edx, [esp + 0x14]
push edx
push edi
call dword [0x8c0b64]
test eax, eax
jne 0x478ae2
lea eax, [esp + 8]
push eax
lea ecx, [esp + 0x10]
push ecx
push 0
push edi
call dword [0x8c0b68]
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.0063265d
add esp, 4
mov dword [esp + 0x10], eax
test eax, eax
jne 0x478afc
push edi
call dword [0x8c0b60]
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
mov eax, dword [str.bpp4_rl0]
mov ecx, dword [0x81f67c]
mov dx, word [0x81f680]
mov dword [esp + 0x48], eax
mov al, byte [0x81f682]
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 [0x8c0b6c]
push edi
test eax, eax
je 0x478b88
call dword [0x8c0b60]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00644b73
add esp, 4
pop edi
xor eax, eax
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
call dword [0x8c0b60]
push 0x10
call fcn.006442a0
add esp, 4
test eax, eax
je 0x478ba5
call fcn.004747c0
mov edi, eax
jmp 0x478ba7
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 0x478bdd
lea ecx, [ecx]
or dword [eax], 0xff000000
add eax, 4
cmp eax, ecx
jne 0x478bd0
call fcn.005a89d0
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x60]
xor ecx, esp
call fcn.00643db8
add esp, 0x64
ret
mov ecx, dword [esp + 0x60]
xor ecx, esp
xor eax, eax
call fcn.00643db8
add esp, 0x64
ret