Function at 0x10050290
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x490
push esi
mov dword [ebp - 0x6c], edx
mov esi, ecx
lea edx, [ebp - 0x90]
mov dword [ebp - 0xc], esi
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x74], 0xff
call fcn.1004fce0
test eax, eax
je 0x100502ed
mov eax, dword [esi + 4]
mov dword [ebp - 0x50], eax
cdq
xor eax, edx
sub eax, edx
mov dword [esi + 4], eax
cmp eax, 0x1000000
jbe 0x100502f4
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x10149458
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [esi]
cmp edi, 0x1000000
jbe 0x10050320
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
pop edi
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x10149534
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x84]
mov ecx, dword [ebp - 0x88]
mov edx, dword [ebp - 0x70]
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x7c]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x14], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x28], eax
push ebx
mov ebx, dword [ebp - 0x8c]
mov dword [ebp - 0x44], ebx
cmp ecx, 0xc
jne 0x10050384
cmp eax, 0x18
jge 0x10050399
mov ecx, ebx
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
jmp 0x10050392
cmp eax, 0x10
jge 0x10050399
mov eax, ebx
sub eax, edx
sub eax, ecx
sar eax, 2
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x10050401
mov eax, dword [esi + 0xa8]
sub eax, dword [esi + 0xb4]
add eax, dword [esi + 0xac]
cmp ebx, eax
je 0x100503c6
push 0x1515
push 0x10149540
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100d84e4
add esp, 0xc
mov ecx, dword [esi + 0xac]
mov eax, dword [esi + 0xa8]
sub ecx, esi
add eax, 0xffffffd8
add eax, ecx
cmp ebx, eax
je 0x100503ff
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
pop ebx
pop edi
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
mov edi, dword [esi]
cmp dword [ebp - 0x28], 0x18
mov ecx, dword [ebp - 0x18]
jne 0x1005041b
cmp ecx, 0xff000000
jne 0x10050419
mov eax, 3
jmp 0x10050425
mov edi, dword [esi]
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ecx, dword [esi + 4]
test edi, edi
js 0x10051406
jne 0x1005043e
lea ebx, [edi*4]
jmp 0x1005045e
mov eax, 0x7fffffff
cdq
idiv edi
cmp eax, 4
jl 0x10051406
lea ebx, [edi*4]
test ebx, ebx
js 0x10051406
test ecx, ecx
js 0x10051406
je 0x10050478
mov eax, 0x7fffffff
cdq
idiv ecx
cmp ebx, eax
jg 0x10051406
test edi, edi
je 0x1005048d
mov eax, 0x7fffffff
cdq
idiv edi
cmp eax, 4
jl 0x100513e4
lea ebx, [edi*4]
test ecx, ecx
je 0x100504a8
mov eax, 0x7fffffff
cdq
idiv ecx
cmp ebx, eax
jg 0x100513e4
imul edi, ecx
lea eax, [edi*4]
push eax
call fcn.100d9e2b
mov edi, eax
add esp, 4
mov dword [ebp - 0x1c], edi
test edi, edi
je 0x100513e4
cmp dword [ebp - 0x28], 0x10
jge 0x10050c8c
mov eax, dword [ebp - 0x10]
xor edi, edi
test eax, eax
je 0x10050c5f
cmp eax, 0x100
jg 0x10050c5f
mov dword [ebp - 0x18], edi
lea ebx, [esi + 0xac]
test eax, eax
jle 0x1005070a
lea edi, [esi + 0x20]
nop
mov eax, dword [ebx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10050514
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
jmp 0x10050565
cmp dword [esi + 0x20], 0
lea edi, [esi + 0x20]
je 0x1005058a
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 0x10050551
lea ecx, [esi + 0x29]
mov dword [edi], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1005055c
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 - 8], edi
mov esi, ebx
mov edi, dword [ebp - 0x18]
mov edx, eax
shl edi, 2
mov dword [esi], edx
mov dl, byte [ebp - 1]
mov esi, dword [ebp - 0xc]
mov byte [ebp + edi - 0x48e], dl
mov edx, dword [ebp - 8]
cmp eax, ecx
jae 0x1005059d
jmp 0x100505f1
mov edx, edi
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x18]
shl edi, 2
mov byte [ebp + edi - 0x48e], 0
cmp dword [edx], 0
je 0x10050611
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]
mov edx, eax
sub ecx, dword [esi + 0xb4]
lea eax, [esi + 0x28]
add dword [esi + 0xa8], ecx
add esp, 0xc
mov dword [ebx], eax
test edx, edx
jne 0x100505e4
mov edx, dword [ebp - 8]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [edx], 0
mov byte [eax], 0
jmp 0x100505ef
lea ecx, [esi + 0x28]
add ecx, edx
mov dword [esi + 0xb0], ecx
mov eax, dword [ebx]
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
mov byte [ebp + edi - 0x48f], dl
mov edx, dword [ebp - 8]
mov dword [ebx], eax
cmp eax, ecx
jae 0x10050619
mov dl, byte [eax]
lea edi, [esi + 0x20]
inc eax
mov dword [ebx], eax
jmp 0x1005067f
mov byte [ebp + edi - 0x48f], 0
cmp dword [edx], 0
mov edi, edx
je 0x1005067d
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]
mov edx, eax
sub ecx, dword [esi + 0xb4]
lea eax, [esi + 0x28]
add dword [esi + 0xa8], ecx
add esp, 0xc
mov dword [ebx], eax
test edx, edx
jne 0x10050669
mov edx, dword [ebp - 8]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [edx], 0
mov byte [eax], 0
mov eax, dword [ebx]
mov dl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x1005067f
mov eax, dword [ebx]
lea ecx, [esi + 0x28]
add ecx, edx
mov dword [esi + 0xb0], ecx
mov dl, byte [eax]
inc eax
mov dword [ebx], eax
jmp 0x1005067f
xor dl, dl
cmp dword [ebp - 0x14], 0xc
mov esi, dword [ebp - 0x18]
mov byte [ebp + esi*4 - 0x490], dl
mov esi, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
je 0x100506f0
cmp eax, ecx
jae 0x1005069e
inc eax
mov dword [ebx], eax
jmp 0x100506f0
cmp dword [edx], 0
je 0x100506f0
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
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x100506e3
mov eax, dword [ebp - 8]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x100506ee
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
inc dword [ebx]
mov edx, dword [ebp - 0x18]
mov byte [ebp + edx*4 - 0x48d], 0xff
inc edx
mov dword [ebp - 0x18], edx
cmp edx, dword [ebp - 0x10]
jl 0x10050500
xor edi, edi
mov ecx, dword [ebp - 0x44]
xor eax, eax
cmp dword [ebp - 0x14], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0x10]
sub ecx, eax
sub ecx, dword [ebp - 0x2c]
sub ecx, dword [ebp - 0x14]
je 0x1005075d
test ecx, ecx
jns 0x10050735
mov eax, dword [esi + 0xb0]
mov dword [ebx], eax
jmp 0x1005075d
cmp dword [esi + 0x10], 0
je 0x1005075b
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [ebx]
cmp eax, ecx
jge 0x1005075b
sub ecx, eax
mov dword [ebx], edx
mov eax, dword [esi + 0x14]
push ecx
push dword [esi + 0x1c]
call eax
add esp, 8
jmp 0x1005075d
add dword [ebx], ecx
mov ecx, dword [ebp - 0x28]
cmp ecx, 1
jne 0x1005076f
mov edx, dword [esi]
lea eax, [edx + 7]
shr eax, 3
jmp 0x1005078a
cmp ecx, 4
jne 0x1005077d
mov edx, dword [esi]
lea eax, [edx + 1]
shr eax, 1
jmp 0x1005078a
cmp ecx, 8
jne 0x10050c32
mov eax, dword [esi]
mov edx, eax
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x34], eax
mov eax, dword [esi + 4]
mov ecx, eax
mov dword [ebp - 0xc], eax
jne 0x100509e0
mov dword [ebp - 0x38], 0
test eax, eax
jle 0x100509d3
nop dword [eax]
nop word [eax + eax]
mov ecx, dword [ebx]
mov dword [ebp - 0x20], 7
cmp ecx, dword [esi + 0xb0]
jae 0x100507d8
mov dl, byte [ecx]
inc ecx
mov dword [ebx], ecx
jmp 0x10050839
cmp dword [esi + 0x20], 0
je 0x10050837
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
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x10050821
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x10050839
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [ebx], ecx
jmp 0x10050839
xor dl, dl
movzx eax, dl
mov dword [ebp - 0x3c], eax
mov eax, dword [esi]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x10], eax
test eax, eax
jle 0x1005098a
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x24], eax
nop
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x20]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x3c]
sar eax, cl
and eax, 1
lea ecx, [eax*4]
movzx eax, byte [ebp + ecx - 0x490]
mov byte [edi + edx], al
movzx eax, byte [ebp + ecx - 0x48f]
mov byte [edi + edx + 1], al
movzx eax, byte [ebp + ecx - 0x48e]
mov ecx, dword [ebp - 0xc]
mov byte [edi + edx + 2], al
mov eax, dword [ebp - 0x14]
inc eax
mov byte [edi + edx + 3], 0xff
add edi, 4
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x10]
je 0x1005098a
sub dword [ebp - 0x20], 1
jns 0x10050972
mov eax, ecx
mov dword [ebp - 0x20], 7
cmp eax, dword [esi + 0xb0]
jae 0x100508f0
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
movzx edx, byte [ebp - 1]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x1c]
mov dword [ebx], ecx
mov dword [ebp - 8], ecx
jmp 0x10050978
cmp dword [esi + 0x20], 0
je 0x10050958
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
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x10050930
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x1005093b
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov cl, byte [eax]
mov byte [ebp - 1], cl
lea ecx, [eax + 1]
movzx edx, byte [ebp - 1]
mov dword [ebx], ecx
mov eax, dword [esi]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x1c]
mov dword [ebp - 8], ecx
jmp 0x10050978
mov byte [ebp - 1], 0
mov ecx, eax
movzx edx, byte [ebp - 1]
mov eax, dword [ebx]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x3c], edx
mov edx, dword [ebp - 0x1c]
jmp 0x10050978
mov ecx, dword [ebp - 8]
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x10], eax
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x14], eax
jl 0x10050860
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x100509bf
cmp dword [esi + 0x10], 0
je 0x100509bb
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x100509bb
mov ecx, dword [esi + 0xb0]
sub eax, edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov dword [ebx], ecx
call eax
add esp, 8
jmp 0x100509bf
add eax, ecx
mov dword [ebx], eax
mov edx, dword [ebp - 0x38]
mov eax, dword [esi + 4]
inc edx
mov dword [ebp - 0x38], edx
mov ecx, eax
cmp edx, eax
jl 0x100507c0
mov edi, dword [ebp - 0x1c]
mov edx, eax
mov dword [ebp - 0xc], eax
jmp 0x100512ea
mov dword [ebp - 0x24], 0
test eax, eax
jle 0x10050c27
nop
mov dword [ebp - 0x14], 0
test edx, edx
jle 0x10050bde
nop
mov eax, dword [ebx]
mov ecx, dword [esi + 0xb0]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x20], ecx
cmp eax, ecx
jae 0x10050a22
mov dl, byte [eax]
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebx], eax
lea eax, [esi + 0x20]
jmp 0x10050aa0
cmp dword [esi + 0x20], 0
lea eax, [esi + 0x20]
mov dword [ebp - 0x10], eax
je 0x10050a9b
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
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x10050a81
mov eax, dword [ebp - 0x10]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [esi + 0xb0]
mov dword [ebp - 0x20], eax
mov eax, dword [ebx]
mov dl, byte [eax]
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebx], eax
jmp 0x10050aa3
lea ecx, [esi + 0x28]
add ecx, eax
mov eax, dword [ebx]
mov dword [esi + 0xb0], ecx
mov dword [ebp - 0x20], ecx
mov dl, byte [eax]
inc eax
mov dword [ebp - 0xc], eax
mov dword [ebx], eax
jmp 0x10050aa3
xor dl, dl
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x28], 4
movzx edx, dl
mov dword [ebp - 0x18], 0
jne 0x10050abe
mov eax, edx
and eax, 0xf
shr edx, 4
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x1c]
movzx eax, byte [ebp + edx*4 - 0x490]
mov byte [edi + ecx], al
movzx eax, byte [ebp + edx*4 - 0x48f]
mov byte [edi + ecx + 1], al
movzx eax, byte [ebp + edx*4 - 0x48e]
mov edx, dword [esi]
mov byte [edi + ecx + 2], al
mov eax, dword [ebp - 0x14]
mov byte [edi + ecx + 3], 0xff
inc eax
add edi, 4
cmp eax, edx
je 0x10050bde
cmp dword [ebp - 0x28], 8
jne 0x10050b99
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 0x20]
jae 0x10050b22
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebx], eax
mov al, byte [ebp - 1]
movzx eax, al
mov dword [ebp - 0x18], eax
jmp 0x10050b9c
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0
je 0x10050b8f
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
lea ecx, [esi + 0x28]
mov dword [ebx], ecx
test eax, eax
jne 0x10050b6a
mov eax, dword [ebp - 0x10]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
jmp 0x10050b75
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [ebx]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 0x1c]
mov dword [ebx], eax
mov al, byte [ebp - 1]
mov edx, dword [esi]
movzx eax, al
mov dword [ebp - 0x18], eax
jmp 0x10050b9c
xor al, al
movzx eax, al
mov dword [ebp - 0x18], eax
jmp 0x10050b9c
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax*4 - 0x490]
mov byte [edi + ecx], al
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax*4 - 0x48f]
mov byte [edi + ecx + 1], al
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax*4 - 0x48e]
mov byte [edi + ecx + 2], al
mov eax, dword [ebp - 0x14]
add eax, 2
mov byte [edi + ecx + 3], 0xff
add edi, 4
mov dword [ebp - 0x14], eax
cmp eax, edx
jl 0x10050a00
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10050c13
cmp dword [esi + 0x10], 0
je 0x10050c11
mov ecx, dword [esi + 0xb0]
sub ecx, dword [ebx]
cmp ecx, eax
jge 0x10050c11
mov edx, dword [esi + 0xb0]
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov dword [ebx], edx
call eax
mov edx, dword [esi]
add esp, 8
jmp 0x10050c13
add dword [ebx], eax
mov eax, dword [esi + 4]
mov ecx, eax
inc dword [ebp - 0x24]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x24], eax
jl 0x100509f0
mov edi, dword [ebp - 0x1c]
mov edx, dword [ebp - 0xc]
jmp 0x100512ea
push dword [ebp - 0x1c]
call fcn.100d2aca
mov ecx, dword [0x101a0f04]
add esp, 4
mov eax, dword fs:[0x2c]
pop ebx
mov eax, dword [eax + ecx*4]
pop edi
pop esi
mov dword [eax + 0x10], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x1c]
call fcn.100d2aca
mov ecx, dword [0x101a0f04]
add esp, 4
mov eax, dword fs:[0x2c]
pop ebx
mov eax, dword [eax + ecx*4]
pop edi
pop esi
mov dword [eax + 0x10], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x44]
xor ebx, ebx
sub eax, dword [ebp - 0x2c]
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x64], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x60], 0
mov dword [ebp - 0x10], ebx
sub eax, dword [ebp - 0x14]
je 0x10050d19
test eax, eax
jns 0x10050ce6
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10050d19
cmp dword [esi + 0x10], ebx
je 0x10050d13
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10050d13
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 0x10050d19
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x28]
cmp ecx, 0x18
jne 0x10050d28
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x10050d35
cmp ecx, 0x10
jne 0x10050d33
mov eax, dword [esi]
add eax, eax
jmp 0x10050d35
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x68], eax
cmp ecx, 0x18
jne 0x10050d4e
mov dword [ebp - 0x10], 1
jmp 0x10050f1d
mov edx, dword [ebp - 0x20]
cmp ecx, 0x20
mov ecx, dword [ebp - 0x30]
jne 0x10050d87
cmp edx, 0xff
jne 0x10050d87
cmp dword [ebp - 0x24], 0xff00
jne 0x10050d87
cmp ecx, 0xff0000
jne 0x10050d87
cmp dword [ebp - 0x18], 0xff000000
jne 0x10050da5
mov dword [ebp - 0x10], 2
jmp 0x10050f1d
xor eax, eax
mov dword [ebp - 0x10], eax
test ecx, ecx
je 0x100513b9
cmp dword [ebp - 0x24], eax
je 0x100513b9
test edx, edx
je 0x100513b9
call fcn.1004fc00
sub eax, 7
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x30]
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 - 0x34], eax
call fcn.1004fc00
sub eax, 7
mov dword [ebp - 0x58], 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
mov ecx, dword [ebp - 0x20]
movzx eax, al
mov dword [ebp - 0x38], eax
call fcn.1004fc00
sub eax, 7
mov dword [ebp - 0x5c], 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 - 0x18]
movzx eax, al
mov dword [ebp - 0x3c], eax
call fcn.1004fc00
sub eax, 7
mov dword [ebp - 0x64], 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
cmp dword [ebp - 0x34], 8
movzx eax, al
mov dword [ebp - 0x60], eax
ja 0x1005138e
cmp dword [ebp - 0x38], 8
ja 0x1005138e
cmp dword [ebp - 0x3c], 8
ja 0x1005138e
cmp eax, 8
ja 0x1005138e
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x4c], ebx
test edx, edx
jle 0x100512ea
nop dword [eax]
cmp dword [ebp - 0x10], 0
mov eax, dword [esi]
mov dword [ebp - 0x48], 0
je 0x100511f5
test eax, eax
jle 0x10051299
lea edx, [esi + 0xac]
lea eax, [esi + 0x20]
mov ecx, dword [esi + 0xb0]
mov dword [ebp - 8], eax
mov eax, dword [edx]
cmp eax, ecx
jae 0x10050f79
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
mov edx, eax
mov dword [ebp - 0x2c], edx
lea edx, [esi + 0xac]
mov dword [ebp - 0x14], eax
jmp 0x10050fec
cmp dword [esi + 0x20], 0
lea edi, [esi + 0x20]
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x1c]
je 0x10051011
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 0x10050fd2
mov eax, dword [ebp - 8]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x10050fdd
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 - 0x14], eax
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x44], edx
mov edi, dword [ebp - 0x44]
mov edx, dword [ebp - 0x2c]
mov dword [edi], edx
mov edi, dword [ebp - 8]
mov dl, byte [ebp - 1]
mov dword [ebp - 0xc], edi
mov edi, dword [ebp - 0x1c]
mov byte [ebx + edi + 2], dl
cmp dword [ebp - 0x14], ecx
jae 0x1005101f
mov eax, dword [ebp - 0x14]
jmp 0x10051088
mov edx, dword [ebp - 8]
mov dword [ebp - 8], edx
mov byte [ebx + edi + 2], 0
mov dword [ebp - 0xc], edx
mov edi, dword [ebp - 8]
cmp dword [edi], 0
mov edi, dword [ebp - 0x1c]
je 0x100510b6
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
lea ecx, [esi + 0x28]
mov dword [esi + 0xac], ecx
test eax, eax
jne 0x10051077
mov eax, dword [ebp - 8]
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov dword [eax], 0
mov byte [esi + 0x28], 0
jmp 0x10051082
lea ecx, [esi + 0x28]
add ecx, eax
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov dword [ebp - 0x14], eax
mov byte [ebp - 1], dl
mov byte [ebx + edi + 1], dl
cmp eax, ecx
jae 0x100510bb
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
lea edx, [esi + 0x20]
mov dword [esi + 0xac], eax
mov dword [ebp - 8], edx
jmp 0x10051140
mov byte [ebx + edi + 1], 0
mov edi, dword [ebp - 8]
cmp dword [edi], 0
mov edi, dword [ebp - 0x1c]
je 0x10051133
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
mov dword [ebp - 0x2c], eax
lea eax, [esi + 0x28]
mov dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
test ecx, ecx
jne 0x10051114
mov ecx, dword [ebp - 0xc]
mov dword [ecx], 0
lea ecx, [esi + 0x29]
mov dword [esi + 0xb0], ecx
mov byte [eax], 0
jmp 0x1005111f
add ecx, 0x28
add ecx, esi
mov dword [esi + 0xb0], ecx
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov byte [ebp - 1], dl
mov dword [esi + 0xac], eax
jmp 0x10051140
mov edi, dword [ebp - 8]
mov dword [ebp - 8], edi
mov edi, dword [ebp - 0x1c]
mov byte [ebp - 1], 0
cmp dword [ebp - 0x10], 2
mov dl, byte [ebp - 1]
mov byte [ebx + edi], dl
lea edx, [esi + 0xac]
jne 0x100511ce
cmp eax, ecx
jae 0x1005115d
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100511d1
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0
je 0x100511ca
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
lea ecx, [esi + 0x28]
mov dword [edx], ecx
test eax, eax
jne 0x100511b6
mov eax, dword [ebp - 0xc]
mov dword [eax], 0
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [ecx], 0
mov eax, dword [edx]
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100511d1
add eax, 0x28
add eax, esi
mov dword [esi + 0xb0], eax
mov eax, dword [edx]
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100511d1
xor cl, cl
jmp 0x100511d1
or cl, 0xff
movzx eax, cl
or dword [ebp - 0x40], eax
mov eax, dword [ebp - 0x48]
inc eax
mov byte [ebx + edi + 3], cl
add ebx, 4
mov dword [ebp - 0x48], eax
cmp eax, dword [esi]
mov eax, dword [ebp - 8]
jl 0x10050f54
jmp 0x10051299
test eax, eax
jle 0x10051299
nop dword [eax]
mov ecx, esi
call fcn.10046310
cmp dword [ebp - 0x28], 0x10
je 0x1005121e
mov ecx, esi
mov edi, eax
call fcn.10046310
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0x1c]
push dword [ebp - 0x34]
mov edx, dword [ebp - 0x54]
mov ecx, eax
and ecx, dword [ebp - 0x30]
mov dword [ebp - 0xc], eax
call fcn.1004fc60
mov ecx, dword [ebp - 0xc]
push dword [ebp - 0x38]
and ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x58]
mov byte [ebx + edi], al
call fcn.1004fc60
mov ecx, dword [ebp - 0xc]
push dword [ebp - 0x3c]
and ecx, dword [ebp - 0x20]
mov edx, dword [ebp - 0x5c]
mov byte [ebx + edi + 1], al
call fcn.1004fc60
mov ecx, dword [ebp - 0x18]
add esp, 0xc
mov byte [ebx + edi + 2], al
test ecx, ecx
je 0x1005127b
push dword [ebp - 0x60]
and ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x64]
call fcn.1004fc60
add esp, 4
jmp 0x10051280
mov eax, 0xff
or dword [ebp - 0x40], eax
mov byte [ebx + edi + 3], al
add ebx, 4
mov eax, dword [ebp - 0x48]
inc eax
mov dword [ebp - 0x48], eax
cmp eax, dword [esi]
jl 0x10051200
mov edx, dword [ebp - 0x68]
test edx, edx
je 0x100512d6
cmp dword [esi + 0x10], 0
je 0x100512d0
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x100512d0
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 0x100512d6
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x4c]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x4c], eax
mov ecx, edx
cmp eax, edx
jl 0x10050f30
cmp dword [ebp - 0x40], 0
jne 0x1005130c
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x1005130c
mov byte [eax + edi], 0xff
sub eax, 4
jns 0x10051300
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x50], 0
jle 0x10051376
xor ebx, ebx
mov dword [ebp - 0x4c], ebx
test ecx, 0xfffffffe
jle 0x10051376
nop
mov eax, dword [esi]
sub ecx, ebx
dec ecx
mov edx, eax
imul ecx, eax
imul edx, ebx
xor ebx, ebx
shl eax, 2
shl ecx, 2
shl edx, 2
mov dword [ebp - 0x50], edx
lea edx, [ecx + edi]
test eax, eax
jle 0x10051364
mov edi, dword [ebp - 0x50]
sub edi, ecx
mov al, byte [edx]
lea edx, [edx + 1]
mov cl, byte [edi + edx - 1]
inc ebx
mov byte [edi + edx - 1], al
mov byte [edx - 1], cl
mov eax, dword [esi]
shl eax, 2
cmp ebx, eax
jl 0x10051347
mov edi, dword [ebp - 0x1c]
mov ebx, dword [ebp - 0x4c]
mov ecx, dword [esi + 4]
inc ebx
mov eax, ecx
mov dword [ebp - 0x4c], ebx
sar eax, 1
cmp ebx, eax
jl 0x10051320
mov ecx, dword [ebp - 0x6c]
mov eax, dword [esi]
pop ebx
mov dword [ecx], eax
mov eax, dword [ebp + 8]
mov ecx, dword [esi + 4]
mov dword [eax], ecx
mov eax, edi
pop edi
pop esi
mov esp, ebp
pop ebp
ret
push edi
call fcn.100d2aca
mov ecx, dword [0x101a0f04]
add esp, 4
mov eax, dword fs:[0x2c]
pop ebx
mov eax, dword [eax + ecx*4]
pop edi
pop esi
mov dword [eax + 0x10], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
push edi
call fcn.100d2aca
mov ecx, dword [0x101a0f04]
add esp, 4
mov eax, dword fs:[0x2c]
pop ebx
mov eax, dword [eax + ecx*4]
pop edi
pop esi
mov dword [eax + 0x10], 0x1014978c
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
pop ebx
pop edi
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x10149768
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x101a0f04]
mov eax, dword fs:[0x2c]
pop ebx
pop edi
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x1014975c
xor eax, eax
mov esp, ebp
pop ebp
ret