Function at 0x100526b0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48c
mov dword [ebp - 0x68], edx
lea edx, [ebp - 0x8c]
push esi
mov esi, ecx
mov dword [ebp - 8], 0
mov dword [ebp - 0x70], 0xff
call fcn.10052130
test eax, eax
je 0x1005270a
mov eax, dword [esi + 4]
mov dword [ebp - 0x4c], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x10052711
mov ecx, dword [0x10198f60]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1013a6a4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
jbe 0x10052739
mov ecx, dword [0x10198f60]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1013a6b0
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x80]
mov edx, dword [ebp - 0x6c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x70]
push ebx
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x3c], eax
mov dword [ebp - 0x1c], edx
push edi
mov edi, dword [ebp - 0x88]
mov dword [ebp - 0x30], edi
cmp eax, 0xc
jne 0x1005279b
mov ebx, dword [ebp - 0x8c]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x100527b9
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x100527b2
mov ecx, dword [ebp - 0x8c]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x100527b9
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 8], ebx
test ebx, ebx
jne 0x10052823
mov ecx, dword [esi + 0xa8]
mov eax, ecx
sub eax, dword [esi + 0xb4]
mov edx, dword [esi + 0xac]
add eax, edx
cmp edi, eax
je 0x100527f6
push 0x1515
push 0x1013a6d0
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100e369b
mov edx, dword [esi + 0xac]
add esp, 0xc
mov ecx, dword [esi + 0xa8]
sub ecx, esi
lea eax, [edx - 0x28]
add eax, ecx
cmp edi, eax
je 0x10052823
mov ecx, dword [0x10198f60]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
cmp dword [ebp - 0x2c], 0x18
mov ecx, dword [ebp - 0x24]
jne 0x1005283b
cmp ecx, 0xff000000
jne 0x1005283b
mov eax, 3
jmp 0x10052845
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov edi, dword [esi]
mov ecx, dword [esi + 4]
test edi, edi
js 0x100537e6
jne 0x10052860
lea ebx, [edi*4]
jmp 0x10052882
mov eax, 0x7fffffff
cdq
idiv edi
cmp eax, 4
jl 0x100537e6
lea ebx, [edi*4]
mov eax, ebx
test eax, eax
js 0x100537e6
test ecx, ecx
js 0x100537e6
je 0x1005289c
mov eax, 0x7fffffff
cdq
idiv ecx
cmp ebx, eax
jg 0x100537e6
test edi, edi
je 0x100528ba
xor edx, edx
mov eax, 0x7fffffff
div edi
cmp eax, 4
jl 0x100537c4
test ebx, ebx
js 0x100537c4
test ecx, ecx
je 0x100528cf
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp ebx, eax
jg 0x100537c4
imul ecx, edi
shl ecx, 2
push ecx
call fcn.100e379d
mov ebx, eax
add esp, 4
mov dword [ebp - 0x38], ebx
test ebx, ebx
je 0x100537c4
xor edi, edi
cmp dword [ebp - 0x2c], 0x10
jge 0x100530c9
mov eax, dword [ebp - 8]
test eax, eax
je 0x1005309e
cmp eax, 0x100
jg 0x1005309e
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x10052b5b
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x1005293c
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x1005298b
cmp dword [esi + 0x20], 0
je 0x100529c0
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052976
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x10052981
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov edi, eax
mov dword [ebx], edi
mov edx, ecx
mov edi, dword [ebp - 0xc]
shl edi, 2
mov dword [ebp - 0x18], ebx
mov bl, byte [ebp - 1]
mov dword [ebp - 0x14], edi
mov byte [ebp + edi - 0x48a], bl
lea ebx, [esi + 0xac]
mov dword [ebp - 0x34], edi
cmp eax, ecx
jae 0x100529d5
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x10052a29
shl edx, 2
mov dword [ebp - 0x14], edx
mov byte [ebp + edx - 0x48a], 0
mov edx, ecx
mov ecx, dword [ebp - 0x14]
jmp 0x100529d8
mov ecx, dword [ebp - 0x34]
cmp dword [esi + 0x20], 0
je 0x10052a57
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052a13
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10052a1e
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov edx, ecx
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x28], ebx
mov ebx, eax
mov edi, dword [ebp - 0x28]
mov dword [ebp - 0x18], eax
mov dword [edi], ebx
mov edi, dword [ebp - 0x14]
mov bl, byte [ebp - 1]
mov byte [ebp + edi - 0x48b], bl
lea ebx, [esi + 0xac]
cmp eax, ecx
jae 0x10052a5f
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x10052abc
mov byte [ebp + ecx - 0x48b], 0
cmp dword [esi + 0x20], 0
je 0x10052ab8
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebx]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052aa1
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
mov byte [edi], al
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x10052abc
lea edx, [esi + 0x28]
add edx, eax
mov dword [esi + 0xb0], edx
mov al, byte [edi]
mov byte [ebp - 1], al
lea eax, [edi + 1]
mov dword [ebx], eax
jmp 0x10052abc
mov byte [ebp - 1], 0
cmp dword [ebp - 0x3c], 0xc
mov ecx, dword [ebp - 0x14]
mov bl, byte [ebp - 1]
mov byte [ebp + ecx - 0x48c], bl
lea ebx, [esi + 0xac]
je 0x10052b3a
cmp eax, edx
jae 0x10052ade
inc eax
mov dword [ebx], eax
jmp 0x10052b3a
cmp dword [esi + 0x20], 0
je 0x10052b3a
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea edi, [esi + 0x28]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052b1d
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x10052b28
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov ecx, dword [ebp - 0x14]
lea eax, [edi + 1]
mov dword [esi + 0xac], eax
lea ebx, [esi + 0xac]
mov edx, dword [ebp - 0xc]
inc edx
mov byte [ebp + ecx - 0x489], 0xff
mov ecx, dword [ebp - 8]
mov dword [ebp - 0xc], edx
cmp edx, ecx
jl 0x10052926
mov ebx, dword [ebp - 0x38]
xor edi, edi
jmp 0x10052b5e
mov ecx, dword [ebp - 8]
xor eax, eax
cmp dword [ebp - 0x3c], 0xc
setne al
add eax, 3
imul eax, ecx
mov ecx, dword [ebp - 0x30]
sub ecx, eax
sub ecx, dword [ebp - 0x1c]
sub ecx, dword [ebp - 0x3c]
je 0x10052bc0
test ecx, ecx
jns 0x10052b8c
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10052bc0
cmp dword [esi + 0x10], 0
je 0x10052bba
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x10052bba
sub ecx, eax
mov dword [esi + 0xac], edx
mov eax, dword [esi + 0x14]
push ecx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x10052bc0
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 1
jne 0x10052bd2
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x10052be9
cmp ecx, 4
jne 0x10052bde
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x10052be9
cmp ecx, 8
jne 0x10053073
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x24], eax
mov ecx, edx
jne 0x10052e40
mov dword [ebp - 0x28], 0
test edx, edx
jle 0x100536c5
nop
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 8], ecx
cmp eax, dword [esi + 0xb0]
jae 0x10052c31
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x10052c9e
cmp dword [esi + 0x20], 0
je 0x10052c9c
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052c80
mov ecx, dword [ebp - 8]
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
jmp 0x10052c9e
mov ecx, dword [ebp - 8]
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
jmp 0x10052c9e
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0xc], 0
test edx, edx
jle 0x10052dec
mov eax, edx
mov dword [ebp - 0x10], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x18]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x48c]
mov byte [edi + ebx], al
movzx eax, byte [ebp + ecx - 0x48b]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + ecx - 0x48a]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0xc]
inc eax
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0xc], eax
cmp eax, edx
je 0x10052dec
mov ecx, dword [ebp - 8]
sub ecx, 1
mov dword [ebp - 8], ecx
jns 0x10052dde
mov eax, dword [esi + 0xac]
mov dword [ebp - 8], 7
cmp eax, dword [esi + 0xb0]
jae 0x10052d4a
mov cl, byte [eax]
inc eax
mov edx, dword [ebp - 0x10]
mov dword [esi + 0xac], eax
movzx eax, cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
jmp 0x10052de1
cmp dword [esi + 0x20], 0
je 0x10052dcb
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052da4
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
jmp 0x10052de1
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov edx, dword [esi]
movzx eax, cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
jmp 0x10052de1
mov edx, dword [ebp - 0x10]
xor cl, cl
movzx eax, cl
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0xc]
jmp 0x10052de1
mov edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
cmp eax, edx
jl 0x10052cc0
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x10052e27
cmp dword [esi + 0x10], 0
je 0x10052e21
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10052e21
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x10052e27
add dword [esi + 0xac], eax
mov eax, dword [ebp - 0x28]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x28], eax
mov ecx, edx
cmp eax, edx
jl 0x10052c10
jmp 0x100536c5
mov dword [ebp - 0x20], 0
test edx, edx
jle 0x100536c5
nop
cmp dword [esi], 0
mov dword [ebp - 8], 0
jle 0x10053022
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x10052e7b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x10052ede
cmp dword [esi + 0x20], 0
je 0x10052edc
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052ec3
lea edx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], edx
lea ecx, [esi + 0x29]
mov byte [esi + 0x28], al
mov dword [esi + 0xac], ecx
jmp 0x10052ede
lea edx, [esi + 0x28]
add edx, eax
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], edx
mov al, byte [esi + 0x28]
mov dword [esi + 0xac], ecx
jmp 0x10052ede
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], 0
jne 0x10052efe
mov dword [ebp - 0x10], eax
and dword [ebp - 0x10], 0xf
shr eax, 4
mov dword [ebp - 0xc], eax
movzx eax, byte [ebp + eax*4 - 0x48c]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x48b]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x48a]
mov byte [edi + ebx + 2], al
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 8]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x1005301f
cmp dword [ebp - 0x2c], 8
jne 0x10052fdd
cmp ecx, edx
jae 0x10052f64
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x10052fe3
cmp dword [esi + 0x20], 0
je 0x10052fd3
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
add esp, 0xc
sub ecx, dword [esi + 0xb4]
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10052fb5
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x10052fe3
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov dl, byte [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x10052fe3
mov ecx, dword [ebp - 0xc]
xor dl, dl
movzx edx, dl
jmp 0x10052fe3
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
movzx eax, byte [ebp + edx*4 - 0x48c]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x48b]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x48a]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 8]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 8], eax
cmp eax, ecx
jl 0x10052e60
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1005305d
cmp dword [esi + 0x10], 0
je 0x10053057
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10053057
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
mov eax, dword [ebp - 0x24]
add esp, 8
jmp 0x1005305d
add dword [esi + 0xac], eax
inc dword [ebp - 0x20]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 0x20], edx
jl 0x10052e50
jmp 0x100536c5
push ebx
call fcn.100df64a
mov ecx, dword [0x10198f60]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100df64a
mov ecx, dword [0x10198f60]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0x1c]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x44], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x18], edi
mov dword [ebp - 8], edi
sub eax, dword [ebp - 0x3c]
je 0x10053157
test eax, eax
jns 0x10053124
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10053157
cmp dword [esi + 0x10], edi
je 0x10053151
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10053151
sub eax, ecx
mov dword [esi + 0xac], edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x10053157
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x10053166
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x10053173
cmp ecx, 0x10
jne 0x10053171
mov eax, dword [esi]
add eax, eax
jmp 0x10053173
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x64], eax
cmp ecx, 0x18
jne 0x1005318c
mov dword [ebp - 8], 1
jmp 0x10053356
mov edx, dword [ebp - 0x10]
cmp ecx, 0x20
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x14]
jne 0x100531c6
cmp edx, 0xff
jne 0x100531c6
cmp eax, 0xff00
jne 0x100531c6
cmp ecx, 0xff0000
jne 0x100531c6
cmp dword [ebp - 0x24], 0xff000000
jne 0x100531de
mov dword [ebp - 8], 2
jmp 0x10053356
test ecx, ecx
je 0x10053799
test eax, eax
je 0x10053799
test edx, edx
je 0x10053799
call fcn.10052050
sub eax, 7
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x14]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x20]
movzx eax, al
mov dword [ebp - 0x44], eax
call fcn.10052050
sub eax, 7
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x20]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x10]
movzx eax, al
mov dword [ebp - 0x48], eax
call fcn.10052050
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x10]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
mov ecx, dword [ebp - 0x24]
movzx eax, al
mov dword [ebp - 0x28], eax
call fcn.10052050
sub eax, 7
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x24]
mov edx, eax
and eax, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, eax
mov eax, edx
and edx, 0x33333333
shr eax, 2
and eax, 0x33333333
add eax, edx
mov ecx, eax
shr ecx, 4
add ecx, eax
and ecx, 0xf0f0f0f
mov eax, ecx
shr eax, 8
add ecx, eax
mov eax, ecx
shr eax, 0x10
add eax, ecx
cmp dword [ebp - 0x44], 8
movzx eax, al
mov dword [ebp - 0x5c], eax
ja 0x1005376e
cmp dword [ebp - 0x48], 8
ja 0x1005376e
cmp dword [ebp - 0x28], 8
ja 0x1005376e
cmp eax, 8
ja 0x1005376e
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x34], edi
test edx, edx
jle 0x100536c5
nop word [eax + eax]
cmp dword [ebp - 8], 0
mov eax, dword [esi]
je 0x100535c9
mov dword [ebp - 0x3c], 0
test eax, eax
jle 0x10053674
lea edx, [esi + 0xac]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x100533a5
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10053402
cmp dword [esi + 0x20], 0
je 0x1005342b
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x100533ee
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x100533f9
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x30], edx
mov edx, eax
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x38]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 2], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x10053430
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1005348d
mov byte [ebx + edi + 2], 0
cmp dword [esi + 0x20], 0
je 0x100534b5
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10053479
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10053484
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov al, byte [esi + 0x28]
mov byte [ebp - 1], al
lea eax, [esi + 0x29]
mov dword [ebp - 0x30], edx
mov edx, eax
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 0x1c], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x38]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 1], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x100534ba
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x1005351f
mov byte [ebx + edi + 1], 0
cmp dword [esi + 0x20], 0
je 0x1005351d
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10053508
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x1005351f
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x1005351f
xor cl, cl
cmp dword [ebp - 8], 2
mov byte [edi + ebx], cl
jne 0x100535a2
cmp eax, dword [esi + 0xb0]
jae 0x1005353b
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100535a5
cmp dword [esi + 0x20], 0
je 0x1005359e
push dword [esi + 0x24]
mov eax, dword [esi + 0x10]
lea ecx, [esi + 0x28]
push ecx
push dword [esi + 0x1c]
call eax
mov ecx, dword [esi + 0xac]
lea edx, [esi + 0xac]
sub ecx, dword [esi + 0xb4]
add esp, 0xc
add dword [esi + 0xa8], ecx
test eax, eax
jne 0x10053589
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov byte [esi + 0x28], 0
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x100535a5
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
lea eax, [esi + 0x29]
mov cl, byte [esi + 0x28]
mov dword [edx], eax
jmp 0x100535a5
xor cl, cl
jmp 0x100535a5
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x3c]
inc eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov dword [ebp - 0x3c], eax
cmp eax, dword [esi]
jl 0x10053391
mov dword [ebp - 0x18], edi
jmp 0x10053674
mov dword [ebp - 0x1c], 0
test eax, eax
jle 0x10053674
mov ecx, esi
call fcn.10048870
cmp dword [ebp - 0x2c], 0x10
je 0x100535f6
mov ecx, esi
mov edi, eax
call fcn.10048870
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0x18]
push dword [ebp - 0x44]
mov edx, dword [ebp - 0x50]
mov ecx, eax
and ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], eax
call fcn.100520b0
mov ecx, dword [ebp - 0xc]
push dword [ebp - 0x48]
and ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x54]
mov byte [edi + ebx], al
call fcn.100520b0
mov ecx, dword [ebp - 0xc]
push dword [ebp - 0x28]
and ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x58]
mov byte [edi + ebx + 1], al
call fcn.100520b0
mov ecx, dword [ebp - 0x24]
add esp, 0xc
mov byte [edi + ebx + 2], al
test ecx, ecx
je 0x10053653
push dword [ebp - 0x5c]
and ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x60]
call fcn.100520b0
add esp, 4
jmp 0x10053658
mov eax, 0xff
or dword [ebp - 0x40], eax
mov byte [edi + ebx + 3], al
add edi, 4
mov eax, dword [ebp - 0x1c]
inc eax
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x1c], eax
cmp eax, dword [esi]
jl 0x100535d8
mov edx, dword [ebp - 0x64]
test edx, edx
je 0x100536b1
cmp dword [esi + 0x10], 0
je 0x100536ab
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x100536ab
mov dword [esi + 0xac], eax
mov eax, edx
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x100536b1
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x34]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x34], eax
mov ecx, edx
cmp eax, edx
jl 0x10053370
cmp dword [ebp - 0x40], 0
jne 0x100536ec
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x100536ec
nop dword [eax + eax]
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x100536e0
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x4c], 0
jle 0x10053756
xor edi, edi
mov dword [ebp - 0x34], edi
test ecx, 0xfffffffe
jle 0x10053756
nop
mov eax, dword [esi]
sub ecx, edi
dec ecx
mov edx, eax
imul ecx, eax
imul edx, edi
xor edi, edi
shl eax, 2
shl ecx, 2
shl edx, 2
mov dword [ebp - 0x4c], edx
lea edx, [ebx + ecx]
test eax, eax
jle 0x10053744
mov ebx, dword [ebp - 0x4c]
sub ebx, ecx
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [ebx + edx - 1]
inc edi
mov byte [ebx + edx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp edi, eax
jl 0x10053727
mov ebx, dword [ebp - 0x38]
mov edi, dword [ebp - 0x34]
mov ecx, dword [esi + 4]
inc edi
mov eax, ecx
mov dword [ebp - 0x34], edi
sar eax, 1
cmp edi, eax
jl 0x10053700
mov ecx, dword [ebp - 0x68]
mov eax, dword [esi]
pop edi
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov dword [eax], ecx
mov eax, ebx
pop ebx
pop esi
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100df64a
mov ecx, dword [0x10198f60]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100df64a
mov ecx, dword [0x10198f60]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], 0x1013a9e0
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10198f60]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1013aa1c
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10198f60]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1013aa10
xor eax, eax
mov esp, ebp
pop ebp
ret