Function at 0x10030560
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x4a8
mov dword [ebp - 0x84], edx
lea edx, [ebp - 0xa8]
push esi
mov esi, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x8c], 0xff
call fcn.1002ffe0
test eax, eax
je 0x100305c0
mov eax, dword [esi + 4]
mov dword [ebp - 0x5c], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x100305c7
mov ecx, dword [0x10122750]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100efeb4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
jbe 0x100305ef
mov ecx, dword [0x10122750]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100efffc
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x9c]
mov edx, dword [ebp - 0x88]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x8c]
push ebx
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 8], eax
mov dword [ebp - 0x24], edx
push edi
mov edi, dword [ebp - 0xa4]
mov dword [ebp - 0x28], edi
cmp eax, 0xc
jne 0x10030663
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x10030681
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x1003067a
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x10030681
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x100306eb
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 0x100306be
push 0x1515
push 0x100eff98
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100b210e
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 0x100306eb
mov ecx, dword [0x10122750]
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 - 0x44]
jne 0x10030703
cmp ecx, 0xff000000
jne 0x10030703
mov eax, 3
jmp 0x1003070d
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ecx, dword [esi]
mov ebx, dword [esi + 4]
test ecx, ecx
js 0x100318b2
jne 0x10030728
lea edi, [ecx*4]
jmp 0x1003074a
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x100318b2
lea edi, [ecx*4]
mov eax, edi
test eax, eax
js 0x100318b2
test ebx, ebx
js 0x100318b2
je 0x10030764
mov eax, 0x7fffffff
cdq
idiv ebx
cmp edi, eax
jg 0x100318b2
test ecx, ecx
je 0x10030782
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp eax, 4
jl 0x10031890
test edi, edi
js 0x10031890
test ebx, ebx
je 0x10030797
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp edi, eax
jg 0x10031890
imul ecx, ebx
shl ecx, 2
push ecx
call fcn.100b3beb
mov ebx, eax
add esp, 4
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x10031890
xor edi, edi
cmp dword [ebp - 0x2c], 0x10
jge 0x10030f99
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10030f6e
cmp eax, 0x100
jg 0x10030f6e
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x10030a29
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
nop
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10030806
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x10030859
cmp dword [esi + 0x20], 0
je 0x1003088e
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 0x10030844
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x1003084f
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 - 0x1c], ebx
mov bl, byte [ebp - 1]
mov dword [ebp - 0x10], edi
mov byte [ebp + edi - 0x4a6], bl
lea ebx, [esi + 0xac]
mov dword [ebp - 0x38], edi
cmp eax, ecx
jae 0x100308a3
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x100308f7
shl edx, 2
mov dword [ebp - 0x10], edx
mov byte [ebp + edx - 0x4a6], 0
mov edx, ecx
mov ecx, dword [ebp - 0x10]
jmp 0x100308a6
mov ecx, dword [ebp - 0x38]
cmp dword [esi + 0x20], 0
je 0x10030925
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 0x100308e1
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x100308ec
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 - 0x20], ebx
mov ebx, eax
mov edi, dword [ebp - 0x20]
mov dword [ebp - 0x1c], eax
mov dword [edi], ebx
mov edi, dword [ebp - 0x10]
mov bl, byte [ebp - 1]
mov byte [ebp + edi - 0x4a7], bl
lea ebx, [esi + 0xac]
cmp eax, ecx
jae 0x1003092d
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x1003098a
mov byte [ebp + ecx - 0x4a7], 0
cmp dword [esi + 0x20], 0
je 0x10030986
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 0x1003096f
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 0x1003098a
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 0x1003098a
mov byte [ebp - 1], 0
cmp dword [ebp - 8], 0xc
mov ecx, dword [ebp - 0x10]
mov bl, byte [ebp - 1]
mov byte [ebp + ecx - 0x4a8], bl
lea ebx, [esi + 0xac]
je 0x10030a08
cmp eax, edx
jae 0x100309ac
inc eax
mov dword [ebx], eax
jmp 0x10030a08
cmp dword [esi + 0x20], 0
je 0x10030a08
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 0x100309eb
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x100309f6
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov ecx, dword [ebp - 0x10]
lea eax, [edi + 1]
mov dword [esi + 0xac], eax
lea ebx, [esi + 0xac]
mov edx, dword [ebp - 0xc]
inc edx
mov byte [ebp + ecx - 0x4a5], 0xff
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0xc], edx
cmp edx, ecx
jl 0x100307f0
mov ebx, dword [ebp - 0x48]
xor edi, edi
jmp 0x10030a2c
mov ecx, dword [ebp - 0x14]
xor eax, eax
cmp dword [ebp - 8], 0xc
setne al
add eax, 3
imul eax, ecx
mov ecx, dword [ebp - 0x28]
sub ecx, eax
sub ecx, dword [ebp - 0x24]
sub ecx, dword [ebp - 8]
je 0x10030a8e
test ecx, ecx
jns 0x10030a5a
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10030a8e
cmp dword [esi + 0x10], 0
je 0x10030a88
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x10030a88
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 0x10030a8e
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 1
jne 0x10030aa0
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x10030ab7
cmp ecx, 4
jne 0x10030aac
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x10030ab7
cmp ecx, 8
jne 0x10030f43
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x34], eax
mov ecx, edx
jne 0x10030d10
mov dword [ebp - 8], 0
test edx, edx
jle 0x1003178e
nop dword [eax]
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 0x14], ecx
cmp eax, dword [esi + 0xb0]
jae 0x10030b01
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x10030b6e
cmp dword [esi + 0x20], 0
je 0x10030b6c
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 0x10030b50
mov ecx, dword [ebp - 0x14]
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 0x10030b6e
mov ecx, dword [ebp - 0x14]
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 0x10030b6e
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 0
test edx, edx
jle 0x10030cbc
mov eax, edx
mov dword [ebp - 0x18], eax
nop word [eax + eax]
mov eax, dword [ebp - 0x1c]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x4a8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + ecx - 0x4a7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + ecx - 0x4a6]
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 0x10030cbc
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jns 0x10030cae
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x14], 7
cmp eax, dword [esi + 0xb0]
jae 0x10030c1a
mov cl, byte [eax]
inc eax
mov edx, dword [ebp - 0x18]
mov dword [esi + 0xac], eax
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10030cb1
cmp dword [esi + 0x20], 0
je 0x10030c9b
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 0x10030c74
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 - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10030cb1
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 - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10030cb1
mov edx, dword [ebp - 0x18]
xor cl, cl
movzx eax, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0xc]
jmp 0x10030cb1
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], edx
cmp eax, edx
jl 0x10030b90
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10030cf7
cmp dword [esi + 0x10], 0
je 0x10030cf1
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10030cf1
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 0x10030cf7
add dword [esi + 0xac], eax
mov eax, dword [ebp - 8]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 8], eax
mov ecx, edx
cmp eax, edx
jl 0x10030ae0
jmp 0x1003178e
mov dword [ebp - 0x30], 0
test edx, edx
jle 0x1003178e
nop
cmp dword [esi], 0
mov dword [ebp - 0x20], 0
jle 0x10030ef2
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x10030d4b
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x10030dae
cmp dword [esi + 0x20], 0
je 0x10030dac
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 0x10030d93
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 0x10030dae
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 0x10030dae
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
jne 0x10030dce
mov dword [ebp - 0x18], eax
and dword [ebp - 0x18], 0xf
shr eax, 4
mov dword [ebp - 0xc], eax
movzx eax, byte [ebp + eax*4 - 0x4a8]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x4a7]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x4a6]
mov byte [edi + ebx + 2], al
mov eax, dword [esi]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x20]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, dword [esi]
je 0x10030eef
cmp dword [ebp - 0x2c], 8
jne 0x10030ead
cmp ecx, edx
jae 0x10030e34
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x10030eb3
cmp dword [esi + 0x20], 0
je 0x10030ea3
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 0x10030e85
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 0x10030eb3
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 0x10030eb3
mov ecx, dword [ebp - 0xc]
xor dl, dl
movzx edx, dl
jmp 0x10030eb3
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x18]
movzx eax, byte [ebp + edx*4 - 0x4a8]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x4a7]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x4a6]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x20]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x20], eax
cmp eax, ecx
jl 0x10030d30
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10030f2d
cmp dword [esi + 0x10], 0
je 0x10030f27
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10030f27
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 - 0x34]
add esp, 8
jmp 0x10030f2d
add dword [esi + 0xac], eax
inc dword [ebp - 0x30]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 0x30], edx
jl 0x10030d20
jmp 0x1003178e
push ebx
call fcn.100b230a
mov ecx, dword [0x10122750]
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.100b230a
mov ecx, dword [0x10122750]
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
xor eax, eax
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x28]
sub eax, dword [ebp - 0x24]
mov dword [ebp - 0x30], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x4c], 0
mov dword [ebp - 0x10], edi
sub eax, dword [ebp - 8]
je 0x10031021
test eax, eax
jns 0x10030fee
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10031021
cmp dword [esi + 0x10], edi
je 0x1003101b
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1003101b
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 0x10031021
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x10031030
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x1003103d
cmp ecx, 0x10
jne 0x1003103b
mov eax, dword [esi]
add eax, eax
jmp 0x1003103d
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x80], eax
cmp ecx, 0x18
jne 0x10031058
mov dword [ebp - 0x54], 1
xor eax, eax
jmp 0x10031226
mov edx, dword [ebp - 0x18]
cmp ecx, 0x20
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
jne 0x10031094
cmp edx, 0xff
jne 0x10031094
cmp eax, 0xff00
jne 0x10031094
cmp ecx, 0xff0000
jne 0x10031094
cmp dword [ebp - 0x44], 0xff000000
jne 0x100310ac
mov dword [ebp - 0x54], 2
xor eax, eax
jmp 0x10031226
test ecx, ecx
je 0x10031865
test eax, eax
je 0x10031865
test edx, edx
je 0x10031865
call fcn.1002ff80
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x3c]
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 - 0x40]
movzx eax, al
mov dword [ebp - 0x14], eax
call fcn.1002ff80
sub eax, 7
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x40]
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 - 0x18]
movzx eax, al
mov dword [ebp - 0x4c], eax
call fcn.1002ff80
sub eax, 7
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x18]
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 - 0x44]
movzx eax, al
mov dword [ebp - 0x20], eax
call fcn.1002ff80
sub eax, 7
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
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 - 0x14], 8
movzx ecx, al
mov dword [ebp - 0xc], ecx
ja 0x1003183a
cmp dword [ebp - 0x4c], 8
ja 0x1003183a
mov eax, dword [ebp - 0x20]
cmp eax, 8
ja 0x1003183a
cmp ecx, 8
ja 0x1003183a
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x38], edi
test edx, edx
jle 0x1003178e
mov ecx, dword [ebp - 0x58]
neg ecx
mov dword [ebp - 0x60], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x14]
mov dword [ebp - 0x64], ecx
mov ecx, dword [ebp - 0x30]
neg ecx
mov dword [ebp - 0x68], ecx
mov ecx, 8
sub ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x6c], ecx
mov ecx, dword [ebp - 0x34]
neg ecx
mov dword [ebp - 0x70], ecx
mov ecx, 8
sub ecx, eax
mov eax, dword [ebp - 0x1c]
neg eax
mov dword [ebp - 0x74], ecx
mov dword [ebp - 0x78], eax
mov eax, 8
sub eax, dword [ebp - 0xc]
mov dword [ebp - 0x7c], eax
cmp dword [ebp - 0x54], 0
mov eax, dword [esi]
je 0x100314da
mov dword [ebp - 8], 0
test eax, eax
jle 0x1003173d
lea edx, [esi + 0xac]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x100312b6
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10031313
cmp dword [esi + 0x20], 0
je 0x1003133c
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 0x100312ff
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1003130a
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 - 0x28], edx
mov edx, eax
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x48]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 2], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x10031341
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1003139e
mov byte [ebx + edi + 2], 0
cmp dword [esi + 0x20], 0
je 0x100313c6
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 0x1003138a
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10031395
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 - 0x28], edx
mov edx, eax
mov ebx, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebx], edx
mov ebx, dword [ebp - 0x48]
mov dl, byte [ebp - 1]
mov byte [edi + ebx + 1], dl
lea edx, [esi + 0xac]
cmp eax, ecx
jae 0x100313cb
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10031430
mov byte [ebx + edi + 1], 0
cmp dword [esi + 0x20], 0
je 0x1003142e
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 0x10031419
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 0x10031430
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 0x10031430
xor cl, cl
cmp dword [ebp - 0x54], 2
mov byte [edi + ebx], cl
jne 0x100314b3
cmp eax, dword [esi + 0xb0]
jae 0x1003144c
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100314b6
cmp dword [esi + 0x20], 0
je 0x100314af
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 0x1003149a
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 0x100314b6
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 0x100314b6
xor cl, cl
jmp 0x100314b6
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x50], eax
mov eax, dword [ebp - 8]
inc eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov dword [ebp - 8], eax
cmp eax, dword [esi]
jl 0x100312a2
mov dword [ebp - 0x10], edi
jmp 0x1003173d
mov dword [ebp - 0x24], 0
test eax, eax
jle 0x1003173d
nop dword [eax]
mov ecx, esi
call fcn.100267a0
cmp dword [ebp - 0x2c], 0x10
mov edi, eax
je 0x10031510
mov ecx, esi
call fcn.100267a0
shl eax, 0x10
add eax, edi
mov dword [ebp - 0x28], eax
mov edi, eax
mov ecx, dword [ebp - 0x58]
mov edx, edi
and edx, dword [ebp - 0x3c]
mov eax, edx
shr eax, cl
mov ecx, dword [ebp - 0x60]
shl edx, cl
cmp dword [ebp - 0x58], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x1003154d
push 0x148e
push 0x100efec0
push str.v___256
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x64]
shr edx, cl
mov ecx, dword [ebp - 0x14]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x1003157a
push 0x1490
push 0x100efde0
push str.bits___0__bits___8
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx*4 + 0x1010d3c8]
mov ecx, dword [ecx*4 + 0x1010d3a4]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x40]
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x30]
shr eax, cl
mov ecx, dword [ebp - 0x68]
shl edx, cl
cmp dword [ebp - 0x30], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x100315d4
push 0x148e
push 0x100efec0
push str.v___256
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x6c]
shr edx, cl
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x10031601
push 0x1490
push 0x100efde0
push str.bits___0__bits___8
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx*4 + 0x1010d3c8]
mov ecx, dword [ecx*4 + 0x1010d3a4]
imul eax, edx
mov edx, edi
and edx, dword [ebp - 0x18]
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, edx
mov dword [ebp - 0x10], ecx
mov ecx, dword [ebp - 0x34]
shr eax, cl
mov ecx, dword [ebp - 0x70]
shl edx, cl
cmp dword [ebp - 0x34], 0
cmovge edx, eax
mov dword [ebp - 8], edx
cmp edx, 0x100
jb 0x1003165b
push 0x148e
push 0x100efec0
push str.v___256
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x74]
shr edx, cl
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], edx
cmp ecx, 8
jbe 0x10031688
push 0x1490
push 0x100efde0
push str.bits___0__bits___8
call fcn.100b210e
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx*4 + 0x1010d3c8]
mov ecx, dword [ecx*4 + 0x1010d3a4]
imul eax, edx
sar eax, cl
mov ecx, dword [ebp - 0x10]
mov byte [ecx + ebx], al
inc ecx
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x10], ecx
test eax, eax
je 0x1003171c
mov edx, dword [ebp - 0x1c]
and edi, eax
mov eax, edi
mov ecx, edx
shr eax, cl
mov ecx, dword [ebp - 0x78]
shl edi, cl
test edx, edx
cmovns edi, eax
cmp edi, 0x100
jb 0x100316e0
push 0x148e
push 0x100efec0
push str.v___256
call fcn.100b210e
add esp, 0xc
mov ecx, dword [ebp - 0x7c]
shr edi, cl
mov ecx, dword [ebp - 0xc]
cmp ecx, 8
jbe 0x10031707
push 0x1490
push 0x100efde0
push str.bits___0__bits___8
call fcn.100b210e
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ecx*4 + 0x1010d3c8]
mov ecx, dword [ecx*4 + 0x1010d3a4]
imul eax, edi
sar eax, cl
jmp 0x10031721
mov eax, 0xff
mov edi, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x24]
or dword [ebp - 0x50], eax
inc ecx
mov dword [ebp - 0x24], ecx
mov byte [edi + ebx], al
inc edi
mov dword [ebp - 0x10], edi
cmp ecx, dword [esi]
jl 0x100314f0
mov edx, dword [ebp - 0x80]
test edx, edx
je 0x1003177a
cmp dword [esi + 0x10], 0
je 0x10031774
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x10031774
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 0x1003177a
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x38]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x38], eax
mov ecx, edx
cmp eax, edx
jl 0x10031281
cmp dword [ebp - 0x50], 0
jne 0x100317b0
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x100317b0
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x100317a4
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x5c], 0
jle 0x1003181f
xor edi, edi
mov dword [ebp - 0x38], edi
test ecx, 0xfffffffe
jle 0x1003181f
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 - 0x5c], edx
lea edx, [ecx + ebx]
test eax, eax
jle 0x1003180d
mov ebx, dword [ebp - 0x5c]
sub ebx, ecx
nop word [eax + eax]
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edx + ebx - 1]
inc edi
mov byte [edx + ebx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp edi, eax
jl 0x100317f0
mov ebx, dword [ebp - 0x48]
mov edi, dword [ebp - 0x38]
mov ecx, dword [esi + 4]
inc edi
mov eax, ecx
mov dword [ebp - 0x38], edi
sar eax, 1
cmp edi, eax
jl 0x100317c3
mov ecx, dword [ebp - 0x84]
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.100b230a
mov ecx, dword [0x10122750]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], 0x100f00f8
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100b230a
mov ecx, dword [0x10122750]
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
mov ecx, dword [0x10122750]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100eff70
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x10122750]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100eff7c
xor eax, eax
mov esp, ebp
pop ebp
ret