Function at 0x10004db0
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xe4
push ebx
mov ebx, dword [esp + 0xec]
push ebp
push esi
mov eax, dword [ebx]
push edi
cmp eax, 0x1d
je 0x10004de5
push str.ERROR_non_tile_type_in_uncompress_tile_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
cmp word [ebx + 0x28], 0
jne 0x10004e2d
movsx esi, word [ebx + 0x2a]
lea eax, [esi - 1]
cmp eax, 0x1f
ja case.0x10004e00.3
xor ecx, ecx
mov cl, byte [eax + 0x100063c4]
jmp dword [ecx*4 + 0x100063b8]
mov ecx, dword [ebx + 0x78]
lea eax, [ecx + 0xf]
cdq
and edx, 0xf
add eax, edx
mov esi, eax
sar esi, 4
jmp 0x10004e3b
mov ecx, dword [ebx + 0x78]
lea eax, [ecx + 1]
jmp 0x10004e34
push esi
push str.Image_index_color_precision__d_not_supported_n
jmp 0x100063a0
mov ecx, dword [ebx + 0x78]
lea eax, [ecx + ecx*2 + 1]
cdq
sub eax, edx
mov esi, eax
sar esi, 1
mov bp, word [ebx + 0x24]
shl esi, 1
cmp bp, 5
mov dword [esp + 0x10], esi
mov dword [esp + 0x28], ebp
jne 0x10005116
mov eax, esi
cdq
sub eax, edx
mov edx, dword [ebx + 0x9c]
mov edi, eax
mov eax, dword [ebx + 0x98]
sar edi, 1
test eax, eax
mov dword [esp + 0x20], edx
jne 0x10004eb5
mov edx, 0x10
cmp word [ebx + 0x26], dx
je 0x100057dd
mov ax, word [ebx + 0x2a]
cmp ax, 8
jne 0x10004e9f
test cl, 1
jne 0x10004e9f
pop edi
pop esi
mov word [ebx + 0x26], dx
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
cmp ax, dx
jne 0x10004eb5
pop edi
pop esi
mov word [ebx + 0x26], dx
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov ax, word [ebx + 0x28]
cmp ax, 1
jne 0x10004fe8
cmp word [ebx + 0x2a], 8
jne 0x10004fe8
mov eax, dword [ebx + 0x7c]
imul eax, edi
shl eax, 1
push eax
call fcn.10004d70
mov ecx, dword [ebx + 0x98]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x7c]
add esp, 4
test eax, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], 0
jle 0x10004fa0
xor ecx, ecx
mov eax, dword [esp + 0x10]
cdq
sub eax, edx
mov dl, byte [esp + 0x10]
sar eax, 1
test dl, 1
jne 0x10004f3b
test edi, edi
jle 0x10004f65
mov edx, dword [esp + 0x20]
mov esi, ecx
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x24]
lea eax, [eax + esi*2]
mov esi, edi
mov bp, word [edx]
add edx, 2
mov word [eax], bp
add eax, 2
dec esi
jne 0x10004f2a
jmp 0x10004f65
test edi, edi
jle 0x10004f65
mov edx, dword [esp + 0x20]
mov esi, ecx
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x24]
lea ebp, [eax + esi*2]
mov esi, edi
xor eax, eax
add ebp, 2
mov al, byte [edx + 3]
mov ah, byte [edx]
add edx, 2
mov word [ebp - 2], ax
dec esi
jne 0x10004f51
mov eax, dword [ebx + 0x78]
mov edx, dword [esp + 0x10]
add edx, eax
cmp word [ebx + 0x26], 0x10
lea edx, [edx + eax*2]
mov dword [esp + 0x10], edx
jne 0x10004f8a
and eax, 1
cmp al, 1
jne 0x10004f8a
mov eax, edx
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [ebx + 0x7c]
inc eax
add ecx, edi
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x10004f02
mov eax, dword [ebx + 0x7c]
mov ecx, dword [esp + 0x20]
imul eax, edi
shl eax, 1
mov dword [ebx + 0x5c], eax
push ecx
mov word [0x102dbcf0], 1
call fcn.10004d90
mov edx, dword [esp + 0x28]
add esp, 4
mov dword [ebx + 0x9c], edx
mov dword [ebx + 0x98], 0
pop edi
pop esi
mov word [ebx + 0x26], 0x10
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
test ax, ax
jne 0x10005116
cmp word [ebx + 0x2a], 8
jne 0x10005116
mov eax, dword [ebx + 0x7c]
imul eax, edi
shl eax, 1
push eax
call fcn.10004d70
mov ecx, dword [ebx + 0x98]
mov dword [esp + 0x28], eax
mov eax, dword [ebx + 0x7c]
add esp, 4
test eax, eax
mov dword [esp + 0x10], ecx
mov dword [esp + 0x1c], 0
jle 0x100050ce
xor ecx, ecx
mov edx, dword [esp + 0x10]
lea eax, [edx + 1]
cdq
sub eax, edx
mov dl, byte [esp + 0x10]
sar eax, 1
test dl, 1
jne 0x1000506c
test edi, edi
jle 0x10005096
mov edx, dword [esp + 0x20]
mov esi, ecx
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x24]
lea eax, [eax + esi*2]
mov esi, edi
mov bp, word [edx]
add edx, 2
mov word [eax], bp
add eax, 2
dec esi
jne 0x1000505b
jmp 0x10005096
test edi, edi
jle 0x10005096
mov edx, dword [esp + 0x20]
mov esi, ecx
lea edx, [edx + eax*2]
mov eax, dword [esp + 0x24]
lea ebp, [eax + esi*2]
mov esi, edi
xor eax, eax
add ebp, 2
mov al, byte [edx + 3]
mov ah, byte [edx]
add edx, 2
mov word [ebp - 2], ax
dec esi
jne 0x10005082
mov eax, dword [ebx + 0x78]
mov esi, dword [esp + 0x10]
add esi, eax
cmp word [ebx + 0x26], 0x10
mov dword [esp + 0x10], esi
jne 0x100050b8
and eax, 1
cmp al, 1
jne 0x100050b8
mov eax, esi
inc eax
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x1c]
mov edx, dword [ebx + 0x7c]
inc eax
add ecx, edi
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x10005030
mov ecx, dword [esp + 0x20]
push ecx
call fcn.10004d90
mov eax, dword [ebx + 0x7c]
mov edx, dword [esp + 0x28]
imul eax, edi
add esp, 4
mov dword [ebx + 0x9c], edx
shl eax, 1
mov word [ebx + 0x26], 0x10
mov dword [ebx + 0x5c], eax
pop edi
mov word [0x102dbcf0], 1
pop esi
mov dword [ebx + 0x98], 0
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
cmp bp, 6
jne 0x10005bb7
mov eax, esi
mov ecx, dword [ebx + 0x9c]
cdq
sub eax, edx
xor ebp, ebp
mov edi, eax
mov ax, word [ebx + 0x28]
sar edi, 1
cmp ax, 1
mov dword [esp + 0x20], edi
mov dword [esp + 0x24], ecx
jne 0x10005415
cmp word [ebx + 0x2a], 8
jne 0x10005415
mov edx, dword [ebx + 0x7c]
imul edx, edi
shl edx, 1
push edx
call fcn.10004d70
mov ecx, dword [ebx + 0x7c]
mov esi, eax
imul ecx, edi
shl ecx, 1
mov edx, ecx
xor eax, eax
mov edi, esi
add esp, 4
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
mov dword [esp + 0x3c], esi
and ecx, 3
mov dword [esp + 0x1c], ebp
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x7c]
test eax, eax
jle 0x100053f5
mov edi, dword [esp + 0x40]
mov edx, dword [esp + 0x30]
xor esi, esi
mov dword [esp + 0x28], esi
mov ecx, dword [esp + 0x28]
mov eax, dword [ebx + 0x98]
mov dword [esp + 0x2c], esi
mov esi, dword [ebx + 0x78]
mov dword [esp + 0x38], eax
test esi, esi
mov dword [esp + 0x10], 0
jle 0x100053be
mov esi, dword [esp + 0x24]
lea eax, [esi + ebp*2]
lea esi, [esi + ebp*2 + 2]
mov dword [esp + 0x14], esi
mov bx, word [ebx + 0x2c]
cmp bx, 8
jne 0x10005268
test byte [esp + 0x38], 1
jne 0x10005229
movsx ecx, word [eax]
movsx ebx, word [eax + 2]
xor edx, edx
add eax, 2
mov dl, ch
and ecx, 0xff
mov edi, edx
xor edx, edx
add esi, 2
inc ebp
mov dl, bh
and ebx, 0xff
add esi, 2
inc ebp
mov dword [esp + 0x40], edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], esi
add eax, 2
jmp 0x100052f7
mov cl, byte [eax]
add eax, 2
and ecx, 0xff
inc ebp
movsx edx, word [eax]
mov edi, ecx
xor ecx, ecx
add esi, 2
mov cl, dh
and edx, 0xff
inc ebp
add esi, 2
add eax, 2
xor ebx, ebx
mov dword [esp + 0x40], edi
mov bl, byte [eax + 1]
mov dword [esp + 0x30], edx
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ebx
jmp 0x100052f7
cmp bx, 0x10
jne 0x100052f7
test byte [esp + 0x38], 1
jne 0x100052af
movsx edi, word [eax]
movsx edx, word [eax + 2]
add eax, 2
xor ecx, ecx
inc ebp
add esi, 2
mov cl, dh
and edx, 0xff
inc ebp
add esi, 2
add eax, 2
xor ebx, ebx
mov dword [esp + 0x40], edi
mov dword [esp + 0x30], edx
mov bl, byte [eax + 1]
mov dword [esp + 0x14], esi
mov dword [esp + 0x18], ebx
jmp 0x100052f3
xor edx, edx
mov cl, byte [eax + 2]
mov dl, byte [esi + 1]
add esi, 2
mov dh, byte [eax]
add eax, 2
add eax, 2
mov edi, edx
inc ebp
xor edx, edx
movsx ebx, word [eax]
and ecx, 0xff
add esi, 2
inc ebp
mov dl, bh
and ebx, 0xff
add esi, 2
inc ebp
mov dword [esp + 0x40], edi
mov dword [esp + 0x30], edx
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], esi
add eax, 2
inc dword [esp + 0x38]
test edi, edi
jne 0x10005304
inc dword [esp + 0x10]
jmp 0x100053a2
test edi, edi
mov dword [esp + 0x34], 0
jle 0x100053a2
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
lea esi, [esi + edi*2]
mov ebx, dword [esp + 0xf8]
mov edi, dword [esp + 0x10]
cmp edi, dword [ebx + 0x78]
jge 0x1000539e
test byte [esp + 0x10], 1
jne 0x1000535a
mov edi, dword [esp + 0x2c]
xor ebx, ebx
mov bl, dl
inc edi
mov bh, cl
mov dword [esp + 0x2c], edi
mov word [esi], bx
add esi, 2
xor edx, edx
mov dh, byte [esp + 0x18]
mov word [esi], dx
mov edx, dword [esp + 0x30]
jmp 0x10005384
mov edi, dword [esp + 0x2c]
mov dl, cl
and edx, 0xff
xor ebx, ebx
or word [esi], dx
mov bl, byte [esp + 0x18]
mov edx, dword [esp + 0x30]
inc edi
add esi, 2
mov bh, dl
inc edi
mov word [esi], bx
mov dword [esp + 0x2c], edi
add esi, 2
mov edi, dword [esp + 0x10]
mov ebx, dword [esp + 0x40]
inc edi
mov dword [esp + 0x10], edi
mov edi, dword [esp + 0x34]
inc edi
cmp edi, ebx
mov dword [esp + 0x34], edi
jl 0x1000531f
mov esi, dword [esp + 0x14]
mov ebx, dword [esp + 0xf8]
mov edi, dword [esp + 0x10]
cmp edi, dword [ebx + 0x78]
mov edi, dword [esp + 0x40]
jl 0x100051d4
mov eax, dword [esp + 0x38]
and eax, 1
cmp al, 1
jne 0x100053cd
cmp word [ebx + 0x2c], 0x10
jne 0x100053cd
inc ebp
mov esi, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
inc esi
mov dword [esp + 0x1c], esi
mov esi, dword [esp + 0x28]
add esi, eax
mov eax, dword [esp + 0x1c]
cmp eax, dword [ebx + 0x7c]
mov dword [esp + 0x28], esi
jl 0x100051a4
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x24]
push ecx
call fcn.10004d90
mov edx, dword [ebx + 0x7c]
add esp, 4
imul edx, dword [esp + 0x20]
mov dword [ebx + 0x9c], esi
jmp 0x100057b9
test ax, ax
jne 0x10005bb7
cmp word [ebx + 0x2a], 0x10
jne 0x100055e3
mov eax, dword [ebx + 0x7c]
imul eax, edi
shl eax, 1
push eax
call fcn.10004d70
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0x7c]
xor esi, esi
add esp, 4
cmp eax, esi
mov dword [esp + 0x1c], esi
jle 0x1000557c
mov dword [esp + 0x18], esi
mov eax, dword [ebx + 0x78]
mov ecx, dword [esp + 0x18]
mov edx, dword [ebx + 0x98]
mov dword [esp + 0x2c], ecx
test eax, eax
mov dword [esp + 0x38], edx
mov dword [esp + 0x10], 0
jle 0x10005558
mov eax, dword [esp + 0x24]
lea esi, [eax + ebp*2]
lea eax, [eax + ebp*2 + 2]
mov cx, word [ebx + 0x2c]
cmp cx, 8
je 0x100055c6
cmp cx, 0x10
jne 0x100057ea
test byte [esp + 0x38], 1
jne 0x100054b6
movsx edi, word [esi]
movsx ecx, word [esi + 2]
inc ebp
add eax, 2
add esi, 2
mov dword [esp + 0x40], edi
jmp 0x100054d1
xor ecx, ecx
inc ebp
mov cl, byte [eax + 1]
add eax, 2
mov ch, byte [esi]
add esi, 2
mov edi, ecx
xor ecx, ecx
mov cl, byte [eax + 1]
mov dword [esp + 0x40], edi
mov ch, byte [esi]
inc ebp
add eax, 2
add esi, 2
mov dword [esp + 0x14], ecx
test edi, edi
jne 0x100054e6
inc dword [esp + 0x10]
jmp 0x10005549
test edi, edi
mov dword [esp + 0x34], 0
jle 0x10005549
mov edx, dword [esp + 0x3c]
mov edi, dword [esp + 0x2c]
lea edi, [edx + edi*2]
jmp 0x10005503
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x10]
cmp edx, dword [ebx + 0x78]
jge 0x10005549
test dl, 1
jne 0x1000551a
xor edx, edx
mov dh, cl
mov word [edi], dx
jmp 0x1000552f
mov edx, dword [esp + 0x2c]
and ecx, 0xff
or word [edi], cx
inc edx
mov dword [esp + 0x2c], edx
add edi, 2
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x40]
inc ecx
mov dword [esp + 0x10], ecx
mov ecx, dword [esp + 0x34]
inc ecx
cmp ecx, edx
mov dword [esp + 0x34], ecx
jl 0x100054ff
mov ecx, dword [esp + 0x10]
mov edx, dword [ebx + 0x78]
cmp ecx, edx
jl 0x10005483
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov edx, dword [esp + 0x18]
mov ecx, dword [ebx + 0x7c]
inc eax
add edx, edi
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edx
jl 0x10005453
xor esi, esi
mov eax, dword [esp + 0x24]
push eax
call fcn.10004d90
mov edx, dword [ebx + 0x7c]
mov ecx, dword [esp + 0x40]
imul edx, edi
shl edx, 1
add esp, 4
mov dword [ebx + 0x9c], ecx
mov dword [ebx + 0x5c], edx
mov word [0x102dbcf0], 1
mov dword [ebx + 0x98], esi
pop edi
pop esi
mov word [ebx + 0x26], 0x10
mov word [ebx + 0x24], 5
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
push str.ERROR_16_bit_indexed_with_run_count_precision__8_not_supported_in_uncompress_tile_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
test ax, ax
jne 0x10005bb7
cmp word [ebx + 0x2a], 8
jne 0x100057f9
mov eax, dword [ebx + 0x7c]
imul eax, edi
shl eax, 1
push eax
call fcn.10004d70
mov edx, dword [ebx + 0x98]
mov dword [esp + 0x40], eax
mov eax, dword [ebx + 0x7c]
xor esi, esi
add esp, 4
cmp eax, esi
mov dword [esp + 0x38], edx
mov dword [esp + 0x1c], esi
jle 0x1000579c
mov dword [esp + 0x28], esi
cmp word [ebx + 0x2c], 8
mov dword [esp + 0x2c], esi
je 0x10005640
mov edx, dword [ebx + 0x98]
mov dword [esp + 0x38], edx
mov eax, dword [ebx + 0x78]
mov dword [esp + 0x10], 0
test eax, eax
jle 0x1000576c
mov eax, dword [esp + 0x24]
lea edi, [eax + ebp*2]
lea esi, [eax + ebp*2 + 2]
jmp 0x10005664
mov esi, dword [esp + 0x18]
mov ax, word [ebx + 0x2c]
cmp ax, 8
jne 0x100056a6
test dl, 1
jne 0x1000568c
movsx eax, word [edi]
xor ecx, ecx
add esi, 2
mov cl, ah
and eax, 0xff
inc ebp
mov dword [esp + 0x18], esi
add edi, 2
jmp 0x100056f0
mov cl, byte [edi]
add esi, 2
and ecx, 0xff
inc ebp
add edi, 2
xor eax, eax
mov dword [esp + 0x18], esi
mov al, byte [edi + 1]
jmp 0x100056f0
cmp ax, 0x10
jne 0x100057ea
test dl, 1
jne 0x100056ca
movsx ecx, word [edi]
inc ebp
add esi, 2
add edi, 2
xor eax, eax
mov dword [esp + 0x18], esi
mov al, byte [edi + 1]
jmp 0x100056eb
xor ecx, ecx
mov al, byte [edi + 2]
mov cl, byte [esi + 1]
add esi, 2
mov ch, byte [edi]
add edi, 2
inc ebp
and eax, 0xff
add esi, 2
inc ebp
mov dword [esp + 0x18], esi
add edi, 2
inc edx
mov dword [esp + 0x38], edx
test ecx, ecx
jne 0x100056fa
inc dword [esp + 0x10]
jmp 0x10005759
test ecx, ecx
mov dword [esp + 0x34], 0
jle 0x10005759
mov edx, dword [esp + 0x3c]
mov esi, dword [esp + 0x2c]
lea esi, [edx + esi*2]
mov edx, dword [esp + 0x10]
cmp edx, dword [ebx + 0x78]
jge 0x10005755
test dl, 1
jne 0x10005728
xor edx, edx
mov dh, al
mov word [esi], dx
jmp 0x1000573f
mov dl, al
and edx, 0xff
or word [esi], dx
mov edx, dword [esp + 0x2c]
inc edx
add esi, 2
mov dword [esp + 0x2c], edx
mov edx, dword [esp + 0x10]
inc edx
mov dword [esp + 0x10], edx
mov edx, dword [esp + 0x34]
inc edx
cmp edx, ecx
mov dword [esp + 0x34], edx
jl 0x10005711
mov edx, dword [esp + 0x38]
mov eax, dword [esp + 0x10]
mov ecx, dword [ebx + 0x78]
cmp eax, ecx
jl 0x10005660
mov esi, dword [esp + 0x28]
mov ecx, edx
and ecx, 1
cmp cl, 1
jne 0x1000577e
cmp word [ebx + 0x2c], 0x10
jne 0x1000577e
inc ebp
mov eax, dword [esp + 0x1c]
mov edi, dword [esp + 0x20]
mov ecx, dword [ebx + 0x7c]
inc eax
add esi, edi
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x28], esi
jl 0x1000562b
mov eax, dword [esp + 0x24]
push eax
call fcn.10004d90
mov ecx, dword [esp + 0x40]
mov edx, dword [ebx + 0x7c]
add esp, 4
mov dword [ebx + 0x9c], ecx
imul edx, edi
shl edx, 1
mov dword [ebx + 0x5c], edx
mov word [0x102dbcf0], 1
mov dword [ebx + 0x98], 0
mov word [ebx + 0x26], 0x10
mov word [ebx + 0x24], 5
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
movsx edx, word [ebx + 0x2c]
push edx
push str.Error:_run_count_precision__d_not_supported_in_uncompress_tile_n
jmp 0x100063a0
test ax, ax
jne 0x10005bb7
cmp word [ebx + 0x2a], 1
jne 0x10005bb7
mov eax, dword [ebx + 0x7c]
imul eax, edi
shl eax, 1
push eax
call fcn.10004d70
mov ecx, dword [ebx + 0x7c]
mov edx, eax
imul ecx, edi
shl ecx, 1
mov dword [esp + 0x40], edx
mov edi, edx
mov edx, ecx
xor eax, eax
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
rep stosb byte es:[edi], al
mov ecx, dword [ebx + 0x98]
xor eax, eax
cmp ecx, eax
je 0x10005867
push str.1_bit_run_length_with_byte_offset_not_supported_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
cmp word [ebx + 0x2c], 0x10
je 0x1000588b
push str.1_bit_run_length_with_8_bit_run_count_not_supported_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov ecx, dword [ebx + 0x7c]
mov dword [esp + 0x1c], eax
cmp ecx, eax
jle 0x10005b60
mov esi, dword [esp + 0x40]
mov ebx, dword [esp + 0x14]
mov dword [esp + 0x18], eax
mov edx, dword [esp + 0xf8]
xor eax, eax
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], eax
mov ecx, dword [edx + 0x78]
cmp ecx, eax
jle 0x10005b3e
mov eax, dword [esp + 0x24]
lea edi, [eax + ebp*2]
mov eax, dword [esp + 0x10]
and eax, 0x8000000f
jns 0x100058d9
dec eax
or eax, 0xfffffff0
inc eax
cmp eax, 0xf
ja case.default.0x100058e2
jmp dword [eax*4 + 0x100063e4]
movsx esi, word [edi]
mov bx, word [edi + 2]
add edi, 2
inc ebp
sar ebx, 0xf
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xf
shl esi, 1
and eax, 1
or esi, eax
sar ebx, 0xe
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xe
shl esi, 2
and eax, 3
or esi, eax
sar ebx, 0xd
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xd
shl esi, 3
and eax, 7
or esi, eax
sar ebx, 0xc
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xc
shl esi, 4
and eax, 0xf
or esi, eax
sar ebx, 0xb
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xb
shl esi, 5
and eax, 0x1f
or esi, eax
sar ebx, 0xa
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 0xa
shl esi, 6
and eax, 0x3f
or esi, eax
sar ebx, 9
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 9
shl esi, 7
and eax, 0x7f
or esi, eax
sar ebx, 8
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
xor eax, eax
shl esi, 8
mov al, bh
or esi, eax
sar ebx, 7
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 7
shl esi, 9
and eax, 0x1ff
or esi, eax
sar ebx, 6
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 6
shl esi, 0xa
and eax, 0x3ff
or esi, eax
sar ebx, 5
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 5
shl esi, 0xb
and eax, 0x7ff
or esi, eax
sar ebx, 4
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 4
shl esi, 0xc
and eax, 0xfff
or esi, eax
sar ebx, 3
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 3
shl esi, 0xd
and eax, 0x1fff
or esi, eax
sar ebx, 2
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 2
shl esi, 0xe
and eax, 0x3fff
or esi, eax
sar ebx, 1
jmp 0x10005a93
movsx ebx, word [edi]
movsx esi, word [edi - 2]
mov eax, ebx
sar eax, 1
shl esi, 0xf
and eax, 0x7fff
or esi, eax
and ebx, 1
inc ebp
add edi, 2
and esi, 0x7fff
je 0x10005b2a
test ebx, ebx
jne 0x10005abe
mov eax, dword [esp + 0x14]
add eax, esi
cmp eax, ecx
mov dword [esp + 0x14], eax
jge 0x10005b3e
jmp 0x10005b2a
test esi, esi
mov dword [esp + 0x34], 0
jle 0x10005b2a
mov ecx, dword [esp + 0x14]
mov eax, dword [edx + 0x78]
cmp ecx, eax
jge 0x10005b2a
mov eax, ecx
cdq
and edx, 0xf
add eax, edx
mov edx, dword [esp + 0x18]
sar eax, 4
add eax, edx
mov edx, dword [esp + 0x3c]
lea eax, [edx + eax*2]
mov edx, ecx
and edx, 0x8000000f
jns 0x10005afc
dec edx
or edx, 0xfffffff0
inc edx
mov ecx, 0xf
sub ecx, edx
mov edx, 1
shl edx, cl
or word [eax], dx
mov eax, dword [esp + 0x34]
mov edx, dword [esp + 0x14]
inc eax
inc edx
cmp eax, esi
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0xf8]
mov dword [esp + 0x34], eax
jl 0x10005aca
mov eax, dword [esp + 0x10]
mov ecx, dword [edx + 0x78]
inc eax
cmp eax, ecx
mov dword [esp + 0x10], eax
jl 0x100058c9
mov ecx, dword [esp + 0x20]
mov edi, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
add edi, ecx
mov ecx, dword [edx + 0x7c]
inc eax
cmp eax, ecx
mov dword [esp + 0x1c], eax
mov dword [esp + 0x18], edi
jl 0x100058a6
mov edx, dword [esp + 0x24]
push edx
call fcn.10004d90
mov eax, dword [esp + 0xfc]
mov ecx, dword [esp + 0x40]
add esp, 4
mov edx, dword [eax + 0x7c]
mov dword [eax + 0x9c], ecx
imul edx, dword [esp + 0x20]
shl edx, 1
mov dword [eax + 0x5c], edx
pop edi
mov word [0x102dbcf0], 1
pop esi
mov dword [eax + 0x98], 0
mov word [eax + 0x26], 0x10
mov word [eax + 0x24], 5
pop ebp
xor eax, eax
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x28]
cmp ax, 7
jne 0x10005df3
mov ecx, dword [ebx + 0x7c]
mov eax, dword [ebx + 0x98]
imul ecx, esi
xor ebp, ebp
push ecx
mov dword [esp + 0x18], ebp
mov dword [esp + 0x2c], eax
call fcn.10004d70
mov edi, eax
add esp, 4
cmp edi, ebp
mov dword [esp + 0x30], edi
jne 0x10005c0b
push str.Malloc_error_image_to_bmp_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov ecx, dword [ebx + 0x7c]
xor eax, eax
imul ecx, esi
mov edx, ecx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x5c]
add eax, 0x1000
push eax
call fcn.10004d70
mov ecx, dword [ebx + 0x5c]
mov esi, eax
add ecx, 0x1000
xor eax, eax
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 4
and ecx, 3
mov dword [esp + 0x18], esi
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x5c]
xor edi, edi
cmp eax, ebp
jle 0x10005c98
mov ecx, dword [esp + 0x28]
mov eax, ecx
test cl, 1
cdq
jne 0x10005c7b
sub eax, edx
mov edx, dword [ebx + 0x9c]
sar eax, 1
mov ax, word [edx + eax*2]
sar eax, 8
jmp 0x10005c88
sub eax, edx
mov edx, dword [ebx + 0x9c]
sar eax, 1
mov al, byte [edx + eax*2]
mov byte [esi + edi], al
mov eax, dword [ebx + 0x5c]
inc edi
inc ecx
cmp edi, eax
mov dword [esp + 0x28], ecx
jl 0x10005c5c
mov edx, dword [ebx + 0x9c]
mov ecx, 8
xor eax, eax
lea edi, [esp + 0x44]
rep stosd dword es:[edi], eax
mov ecx, dword [ebx + 0x5c]
push edx
mov dword [esp + 0x48], ecx
call fcn.10004d90
push esi
lea eax, [esp + 0x4c]
push ebp
push eax
call fcn.100dbe60
mov eax, dword [esp + 0x58]
add esp, 0x10
cmp eax, ebp
jle 0x100063a8
mov eax, dword [esp + 0x44]
cmp eax, ebp
jle 0x100063a8
lea ecx, [eax + eax*2]
push ecx
call fcn.10004d70
add esp, 4
cmp eax, ebp
mov dword [esp + 0x14], eax
jne 0x10005d00
push str._nJPEG_ERROR_:_Cant_malloc_space_for_OutBuf...
call fcn.10004d30
add esp, 4
mov eax, dword [esp + 0x48]
mov dword [esp + 0x1c], ebp
cmp eax, ebp
jle 0x10005d86
xor esi, esi
mov edx, dword [esp + 0x1c]
mov eax, dword [ebx + 0x7c]
cmp edx, eax
jge 0x10005d86
lea eax, [esp + 0x14]
push 1
push eax
call fcn.100dbf40
mov eax, dword [esp + 0x4c]
add esp, 8
xor ebp, ebp
test eax, eax
jle 0x10005d6f
xor eax, eax
cmp ebp, dword [ebx + 0x78]
jge 0x10005d6f
mov edx, dword [esp + 0x30]
lea ecx, [eax + esi]
inc ebp
add eax, 3
lea edi, [ecx + edx]
mov ecx, dword [esp + 0x14]
mov dl, byte [eax + ecx - 3]
mov byte [edi], dl
mov ecx, dword [esp + 0x14]
mov dl, byte [eax + ecx - 2]
mov byte [edi + 1], dl
mov ecx, dword [esp + 0x14]
mov dl, byte [eax + ecx - 1]
mov byte [edi + 2], dl
mov ecx, dword [esp + 0x44]
cmp ebp, ecx
jl 0x10005d34
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0x48]
inc eax
add esi, edx
cmp eax, ecx
mov dword [esp + 0x1c], eax
jl 0x10005d0e
mov eax, dword [esp + 0x18]
push eax
call fcn.10004d90
mov ecx, dword [esp + 0x18]
push ecx
call fcn.10004d90
mov eax, dword [ebx + 0x7c]
mov edx, dword [esp + 0x38]
imul eax, dword [esp + 0x18]
mov dword [ebx + 0x9c], edx
mov word [ebx + 0x24], 5
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x5c], eax
mov word [0x102dbcf0], 1
mov eax, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x9c]
cdq
sub eax, edx
sar eax, 1
push eax
push ecx
call fcn.1001249a
add esp, 0x10
mov word [ebx + 0x26], 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
cmp ax, 9
jne 0x10006395
mov edx, dword [ebx + 0x7c]
mov ebp, dword [ebx + 0x9c]
imul edx, esi
push edx
mov dword [esp + 0x2c], ebp
call fcn.10004d70
mov edi, eax
add esp, 4
test edi, edi
mov dword [esp + 0x30], edi
jne 0x10005e3d
push str.Malloc_error_image_to_bmp_n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov ecx, dword [ebx + 0x7c]
xor eax, eax
imul ecx, esi
mov edx, ecx
push 1
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
push 0
and ecx, 3
rep stosb byte es:[edi], al
mov eax, dword [ebx + 0x98]
lea ecx, [esp + 0x6c]
add eax, ebp
push eax
push 0
push ecx
call fcn.10004500
add esp, 0x14
call fcn.100044f0
mov esi, eax
cmp esi, 3
jle 0x10005e8b
call fcn.10004960
push esi
push str.PNG_color_type__d_not_supported_n
jmp 0x100063a0
mov ecx, dword [esp + 0x68]
test ecx, ecx
jle 0x10006373
mov edi, dword [esp + 0x64]
test edi, edi
jle 0x10006373
mov ax, word [ebx + 0x28]
test ax, ax
jne 0x10005ed9
mov edx, dword [esp + 0x8c]
test edx, edx
jne 0x10005ed9
push str.ERROR_in_PNG_tile_no_color_table_for_indexed_tile_n
call fcn.10004d30
add esp, 4
call fcn.10004960
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xe4
ret
cmp ax, 1
jne 0x10005ee4
lea edi, [edi + edi*2]
jmp 0x10005f3c
mov eax, dword [esp + 0x74]
cmp eax, 1
jne 0x10005efd
lea eax, [edi + 7]
cdq
and edx, 7
add eax, edx
mov edi, eax
sar edi, 3
jmp 0x10005f3c
cmp eax, 2
jne 0x10005f13
lea eax, [edi + edi + 7]
cdq
and edx, 7
add eax, edx
mov edi, eax
sar edi, 3
jmp 0x10005f3c
cmp eax, 4
jne 0x10005f2c
lea eax, [edi*4 + 7]
cdq
and edx, 7
add eax, edx
mov edi, eax
sar edi, 3
jmp 0x10005f3c
cmp eax, 8
je 0x10005f3c
cmp eax, 0x10
jne 0x1000636b
add edi, edi
lea edx, [ecx*4]
push edx
call fcn.10004d70
add esp, 4
mov dword [esp + 0x18], eax
test eax, eax
jne 0x10005f71
push str.PNG_ERROR_:_Cant_malloc_space_for_OutBuf..._n
call fcn.10004d30
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
mov eax, dword [esp + 0x68]
xor ebp, ebp
test eax, eax
jle 0x10005f96
mov esi, dword [esp + 0x18]
push edi
call fcn.10004d70
add esp, 4
mov dword [esi], eax
mov eax, dword [esp + 0x68]
inc ebp
add esi, 4
cmp ebp, eax
jl 0x10005f7f
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x100060a0
xor esi, esi
cmp dword [eax], 0x10001
je 0x10005fbb
inc esi
add eax, 0x10
cmp esi, 0x100
jl 0x10005fa7
push esi
push str.n_colors___d_n
call fcn.10004d30
mov eax, dword [esp + 0x7c]
add esp, 8
cmp eax, 1
jne 0x10005fee
push 8
call fcn.10004d70
add esp, 4
mov ebp, eax
mov ecx, 2
mov byte [eax], 0
add eax, 4
dec ecx
jne 0x10005fe3
jmp 0x1000600b
push 0x400
call fcn.10004d70
add esp, 4
mov ebp, eax
mov ecx, 0x100
mov byte [eax], 0
add eax, 4
dec ecx
jne 0x10006002
test esi, esi
jle 0x1000604b
xor edi, edi
lea eax, [ebp + 2]
mov ecx, dword [esp + 0x8c]
add edi, 0x10
add eax, 4
dec esi
mov dl, byte [ecx + edi - 8]
mov byte [eax - 6], dl
mov ecx, dword [esp + 0x8c]
mov dl, byte [ecx + edi - 0xc]
mov byte [eax - 5], dl
mov ecx, dword [esp + 0x8c]
mov dl, byte [ecx + edi - 0x10]
mov byte [eax - 4], dl
mov byte [eax - 3], 0
jne 0x10006014
mov eax, dword [esp + 0x74]
dec eax
cmp eax, 0xf
ja case.0x1000605d.3
xor ecx, ecx
mov cl, byte [eax + 0x10006430]
jmp dword [ecx*4 + 0x10006424]
mov eax, dword [ebx + 0x78]
add eax, 0xf
cdq
and edx, 0xf
add eax, edx
sar eax, 4
jmp 0x10006081
mov eax, dword [ebx + 0x78]
lea eax, [eax + eax*2 + 1]
cdq
sub eax, edx
sar eax, 1
shl eax, 1
mov dword [esp + 0x10], eax
xor edx, edx
xor eax, eax
mov dl, byte [ebp + 4]
mov al, byte [ebp]
push edx
push eax
push str.color__X____X_n
call fcn.10004d30
add esp, 0xc
mov ecx, dword [esp + 0x18]
push ecx
call fcn.10004990
add esp, 4
call fcn.10004960
mov eax, dword [esp + 0x68]
mov dword [esp + 0x1c], 0
test eax, eax
jle 0x100062bf
mov edx, dword [esp + 0x30]
mov ebp, dword [esp + 0x18]
mov dword [esp + 0x14], 0
mov dword [esp + 0x20], edx
mov eax, dword [esp + 0x1c]
mov ecx, dword [ebx + 0x7c]
cmp eax, ecx
jge 0x100062bf
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x1000623b
mov eax, dword [esp + 0x74]
cmp eax, 1
jne 0x1000612a
mov ecx, dword [esp + 0x10]
xor eax, eax
test ecx, ecx
jle 0x10006288
mov esi, ecx
mov ecx, dword [esp + 0x20]
mov edx, dword [ebp]
inc eax
cmp eax, esi
mov dl, byte [edx + eax - 1]
mov byte [ecx + eax - 1], dl
jl 0x10006115
jmp 0x10006288
cmp eax, 2
jne 0x10006179
mov eax, dword [esp + 0x10]
xor edi, edi
test eax, eax
jle 0x10006288
mov esi, dword [esp + 0x20]
mov ebx, eax
mov eax, edi
and eax, 0x80000003
jns 0x10006151
dec eax
or eax, 0xfffffffc
inc eax
shl al, 1
mov cl, 6
sub cl, al
mov eax, edi
cdq
and edx, 3
add eax, edx
mov edx, dword [ebp]
sar eax, 2
mov al, byte [eax + edx]
shr al, cl
and al, 3
mov byte [esi + edi], al
inc edi
cmp edi, ebx
jl 0x10006143
jmp 0x10006288
cmp eax, 4
jne 0x100061c6
mov eax, dword [esp + 0x10]
xor edi, edi
test eax, eax
jle 0x10006288
mov esi, dword [esp + 0x20]
mov ebx, eax
mov edx, edi
and edx, 0x80000001
jns 0x100061a1
dec edx
or edx, 0xfffffffe
inc edx
shl dl, 2
mov cl, 4
mov eax, edi
sub cl, dl
cdq
sub eax, edx
mov edx, dword [ebp]
sar eax, 1
mov al, byte [eax + edx]
shr al, cl
and al, 0xf
mov byte [esi + edi], al
inc edi
cmp edi, ebx
jl 0x10006192
jmp 0x10006288
cmp eax, 8
jne 0x10006206
mov ecx, dword [esp + 0x64]
xor eax, eax
test ecx, ecx
jle 0x10006288
mov ecx, dword [esp + 0xf8]
cmp eax, dword [ecx + 0x78]
jge 0x10006288
mov edx, dword [ebp]
inc eax
mov cl, byte [edx + eax - 1]
mov edx, dword [esp + 0x20]
mov byte [edx + eax - 1], cl
mov ecx, dword [esp + 0x64]
cmp eax, ecx
jl 0x100061d9
jmp 0x10006288
cmp eax, 0x10
jne 0x10006288
mov ecx, dword [esp + 0x64]
xor eax, eax
test ecx, ecx
jle 0x10006288
mov ecx, dword [esp + 0xf8]
cmp eax, dword [ecx + 0x78]
jge 0x10006288
mov edx, dword [ebp]
inc eax
mov cl, byte [edx + eax*2 - 2]
mov edx, dword [esp + 0x20]
mov byte [edx + eax - 1], cl
mov ecx, dword [esp + 0x64]
cmp eax, ecx
jl 0x10006215
jmp 0x10006288
mov eax, dword [esp + 0x64]
xor edi, edi
test eax, eax
jle 0x10006288
mov esi, dword [esp + 0x30]
mov edx, dword [esp + 0x14]
xor eax, eax
mov ecx, dword [esp + 0xf8]
cmp edi, dword [ecx + 0x78]
jge 0x10006288
mov ebx, dword [ebp]
lea ecx, [edx + eax]
add ecx, esi
inc edi
mov bl, byte [ebx + eax]
add eax, 3
mov byte [ecx], bl
mov ebx, dword [ebp]
mov bl, byte [ebx + eax - 2]
mov byte [ecx + 1], bl
mov ebx, dword [ebp]
mov bl, byte [ebx + eax - 1]
mov byte [ecx + 2], bl
mov ecx, dword [esp + 0x64]
cmp edi, ecx
jl 0x1000624f
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0x14]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
mov ebx, dword [esp + 0xf8]
add esi, eax
add edx, eax
mov eax, dword [esp + 0x68]
inc ecx
add ebp, 4
cmp ecx, eax
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], edx
jl 0x100060da
mov edx, dword [esp + 0x28]
push edx
call fcn.10004d90
mov eax, dword [esp + 0x6c]
add esp, 4
xor esi, esi
test eax, eax
jle 0x100062f1
mov edi, dword [esp + 0x18]
mov eax, dword [edi]
push eax
call fcn.10004d90
mov eax, dword [esp + 0x6c]
add esp, 4
inc esi
add edi, 4
cmp esi, eax
jl 0x100062da
mov ecx, dword [esp + 0x18]
push ecx
call fcn.10004d90
mov eax, dword [esp + 0x90]
add esp, 4
test eax, eax
je 0x10006312
push eax
call fcn.10004d90
add esp, 4
mov eax, dword [ebx + 0x7c]
mov edx, dword [esp + 0x30]
imul eax, dword [esp + 0x10]
mov dword [ebx + 0x9c], edx
mov word [ebx + 0x24], 5
mov dword [ebx + 0x98], 0
mov dword [ebx + 0x5c], eax
mov word [0x102dbcf0], 1
mov eax, dword [ebx + 0x5c]
mov ecx, dword [ebx + 0x9c]
cdq
sub eax, edx
sar eax, 1
push eax
push ecx
call fcn.1001249a
add esp, 8
mov word [ebx + 0x26], 0x10
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xe4
ret
push eax
push str.Unsupported_PNG_color_precision__d__n
jmp 0x100063a0
push str.ERROR_in_PNG_tile_width_or_height___0_n
call fcn.10004d30
add esp, 4
call fcn.10004960
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xe4
ret
movsx edx, word [esp + 0x28]
push edx
push str.unsupported_compression_type__d_in_uncompress_tile_n
call fcn.10004d30
add esp, 8
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0xe4
ret