Function at 0x1007ba90
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x480
mov dword [ebp - 0x5c], edx
lea edx, [ebp - 0x80]
push esi
mov esi, ecx
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x64], 0xff
call fcn.1007b5a0
test eax, eax
je 0x1007bae7
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 0x1007baee
mov ecx, dword [0x1021328c]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b4824
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x1000000
jbe 0x1007bb1b
mov ecx, dword [0x1021328c]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b48b4
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x74]
mov edx, dword [ebp - 0x80]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x64]
push ebx
mov ebx, dword [ebp - 0x60]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x30], edx
push edi
mov edi, dword [ebp - 0x7c]
mov dword [ebp - 0x48], edi
cmp eax, 0xc
jne 0x1007bb77
cmp edx, 0x18
jge 0x1007bb8d
mov ecx, edi
mov eax, 0x55555556
sub ecx, ebx
sub ecx, 0x18
imul ecx
mov ecx, dword [ebp - 0x2c]
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x1007bb86
cmp edx, 0x10
jge 0x1007bb8d
mov ebx, edi
sub ebx, dword [ebp - 0x34]
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x1007bbf5
mov eax, dword [esi + 0xa8]
sub eax, dword [esi + 0xb4]
add eax, dword [esi + 0xac]
cmp edi, eax
je 0x1007bbba
push 0x1515
push 0x101b4838
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.101301d6
add esp, 0xc
mov ecx, dword [esi + 0xac]
mov eax, dword [esi + 0xa8]
sub ecx, esi
add eax, 0xffffffd8
add eax, ecx
cmp edi, eax
je 0x1007bbf3
mov ecx, dword [0x1021328c]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], str.bad_offset
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [esi]
cmp dword [ebp - 0x30], 0x18
mov edx, dword [ebp - 0x10]
jne 0x1007bc0f
cmp edx, 0xff000000
jne 0x1007bc0d
mov eax, 3
jmp 0x1007bc19
mov ecx, dword [esi]
xor eax, eax
test edx, edx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ebx, dword [esi + 4]
test ecx, ecx
js 0x1007c8c3
je 0x1007bc49
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x1007c8c3
lea eax, [ecx*4]
test eax, eax
js 0x1007c8c3
test ebx, ebx
js 0x1007c8c3
je 0x1007bc6a
mov eax, 0x7fffffff
cdq
idiv ebx
lea edx, [ecx*4]
cmp edx, eax
jg 0x1007c8c3
test ecx, ecx
je 0x1007bc7f
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x1007c8a1
test ebx, ebx
je 0x1007bc9a
mov eax, 0x7fffffff
cdq
idiv ebx
lea edx, [ecx*4]
cmp edx, eax
jg 0x1007c8a1
imul ebx, ecx
lea eax, [ebx*4]
push eax
call fcn.101304c9
mov ebx, eax
add esp, 4
mov dword [ebp - 0x20], ebx
test ebx, ebx
je 0x1007c8a1
mov ecx, dword [ebp - 0x30]
cmp ecx, 0x10
jge 0x1007c2a8
mov eax, dword [ebp - 0x14]
xor edi, edi
test eax, eax
je 0x1007c27d
cmp eax, 0x100
jg 0x1007c27d
xor edx, edx
mov dword [ebp - 0x10], edx
test eax, eax
jle 0x1007be44
lea ecx, [esi + 0x20]
mov ebx, eax
mov dword [ebp - 8], ecx
nop dword [eax]
nop word [eax + eax]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x1007bd1f
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
mov ebx, dword [ebp - 0x14]
mov dword [esi + 0xac], eax
jmp 0x1007bd53
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
je 0x1007bd4c
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov edx, dword [ebp - 0x10]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [esi + 0xac], eax
jmp 0x1007bd53
mov byte [ebp - 1], 0
mov dword [ebp - 8], ecx
lea edi, [ebp - 0x480]
lea edx, [edi + edx*4]
mov dword [ebp - 0x1c], edx
mov edi, edx
mov dl, byte [ebp - 1]
mov byte [edi + 2], dl
cmp eax, dword [esi + 0xb0]
jae 0x1007bd7a
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007bd99
cmp dword [ecx], 0
je 0x1007bd97
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007bd99
xor cl, cl
mov edx, dword [ebp - 0x1c]
mov byte [edx + 1], cl
cmp eax, dword [esi + 0xb0]
jae 0x1007bdb8
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
lea ecx, [esi + 0x20]
mov dword [esi + 0xac], eax
jmp 0x1007bde2
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0
je 0x1007bdde
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov ecx, dword [ebp - 8]
mov dword [esi + 0xac], eax
jmp 0x1007bde2
mov byte [ebp - 1], 0
cmp dword [ebp - 0x28], 0xc
mov edx, ecx
mov edi, dword [ebp - 0x1c]
mov cl, byte [ebp - 1]
mov byte [edi], cl
mov ecx, edx
mov dword [ebp - 8], ecx
je 0x1007be28
cmp eax, dword [esi + 0xb0]
jae 0x1007be0b
inc eax
lea ecx, [esi + 0x20]
mov dword [esi + 0xac], eax
jmp 0x1007be25
cmp dword [edx], 0
mov ecx, edx
mov dword [ebp - 8], ecx
je 0x1007be28
mov ecx, esi
call fcn.100725f0
inc dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dword [ebp - 8], ecx
mov edx, dword [ebp - 0x10]
mov byte [ebp + edx*4 - 0x47d], 0xff
inc edx
mov dword [ebp - 0x10], edx
cmp edx, ebx
jl 0x1007bd00
mov ebx, dword [ebp - 0x20]
xor edi, edi
mov ecx, dword [ebp - 0x48]
xor eax, eax
cmp dword [ebp - 0x28], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 0x14]
sub ecx, eax
sub ecx, dword [ebp - 0x34]
sub ecx, dword [ebp - 0x28]
je 0x1007bea7
test ecx, ecx
jns 0x1007be73
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1007bea7
cmp dword [esi + 0x10], 0
je 0x1007bea1
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x1007bea1
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 0x1007bea7
add dword [esi + 0xac], ecx
mov edx, dword [ebp - 0x30]
cmp edx, 1
jne 0x1007beb9
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x1007bed0
cmp edx, 4
jne 0x1007bec5
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x1007bed0
cmp edx, 8
jne 0x1007c252
mov eax, dword [esi]
mov ecx, dword [esi + 4]
neg eax
and eax, 3
cmp edx, 1
mov dword [ebp - 0x24], eax
mov edx, ecx
jne 0x1007c08b
mov dword [ebp - 0x38], 0
test ecx, ecx
jle 0x1007c790
nop word [eax + eax]
mov ecx, dword [esi + 0xac]
mov dword [ebp - 0x10], 7
cmp ecx, dword [esi + 0xb0]
jae 0x1007bf20
mov dl, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x1007bf42
cmp dword [esi + 0x20], 0
je 0x1007bf40
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [esi + 0xac], ecx
jmp 0x1007bf42
xor dl, dl
movzx eax, dl
mov dword [ebp - 0x40], eax
mov eax, dword [esi]
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], eax
test eax, eax
jle 0x1007c035
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0xc], eax
mov edx, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x10]
sar edx, cl
and edx, 1
movzx eax, byte [ebp + edx*4 - 0x480]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x47f]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x47e]
mov edx, dword [ebp - 0x3c]
mov ecx, edx
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x1c]
inc eax
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x1c], eax
cmp eax, dword [ebp - 0x18]
je 0x1007c035
sub dword [ebp - 0x10], 1
jns 0x1007c01a
mov dword [ebp - 0x10], 7
cmp edx, dword [esi + 0xb0]
jae 0x1007bfde
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
mov dl, byte [ebp - 1]
mov eax, dword [ebp - 0xc]
movzx edx, dl
mov dword [esi + 0xac], ecx
mov dword [ebp - 0x40], edx
jmp 0x1007c023
cmp dword [esi + 0x20], 0
je 0x1007c006
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
lea ecx, [eax + 1]
movzx edx, dl
mov dword [esi + 0xac], ecx
mov eax, dword [esi]
mov dword [ebp - 0x40], edx
jmp 0x1007c023
mov eax, dword [ebp - 0xc]
mov ecx, edx
mov byte [ebp - 1], 0
mov dl, byte [ebp - 1]
movzx edx, dl
mov dword [ebp - 0x40], edx
jmp 0x1007c023
mov ecx, dword [esi + 0xac]
mov eax, dword [ebp - 0xc]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x3c], ecx
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0x1c], eax
jl 0x1007bf62
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1007c072
cmp dword [esi + 0x10], 0
je 0x1007c06a
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x1007c06a
mov ecx, dword [esi + 0xb0]
sub eax, edx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
mov dword [esi + 0xac], ecx
call eax
add esp, 8
jmp 0x1007c072
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebp - 0x38]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x38], eax
mov edx, ecx
cmp eax, ecx
jl 0x1007bf00
jmp 0x1007c790
mov dword [ebp - 0x14], 0
test ecx, ecx
jle 0x1007c790
nop word [eax + eax]
mov ecx, dword [esi]
mov dword [ebp - 0x18], 0
test ecx, ecx
jle 0x1007c201
mov edx, dword [esi + 0xac]
mov dword [ebp - 0x1c], edx
cmp edx, dword [esi + 0xb0]
jae 0x1007c0d0
mov al, byte [edx]
inc edx
mov dword [ebp - 0x1c], edx
mov dword [esi + 0xac], edx
jmp 0x1007c0fd
cmp dword [esi + 0x20], 0
je 0x1007c0fb
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
lea edx, [eax + 1]
mov byte [ebp - 1], cl
mov ecx, dword [esi]
mov al, byte [ebp - 1]
mov dword [ebp - 0x1c], edx
mov dword [esi + 0xac], edx
jmp 0x1007c0fd
xor al, al
mov ebx, esi
movzx eax, al
mov edx, 0x20
mov dword [ebp - 0xc], eax
add edx, ebx
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x30], 4
mov ebx, dword [ebp - 0x20]
mov dword [ebp - 0x2c], edx
mov edx, dword [ebp - 0x1c]
jne 0x1007c12f
mov dword [ebp - 0x10], eax
and dword [ebp - 0x10], 0xf
shr eax, 4
mov dword [ebp - 0xc], eax
movzx eax, byte [ebp + eax*4 - 0x480]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x47f]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0xc]
movzx eax, byte [ebp + eax*4 - 0x47e]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x18]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, ecx
je 0x1007c1fe
cmp dword [ebp - 0x30], 8
jne 0x1007c1bc
cmp edx, dword [esi + 0xb0]
jae 0x1007c190
mov al, byte [edx]
mov byte [ebp - 1], al
lea eax, [edx + 1]
mov dl, byte [ebp - 1]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x1007c1bf
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
je 0x1007c1b5
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x1007c1bf
xor dl, dl
movzx edx, dl
jmp 0x1007c1bf
mov edx, dword [ebp - 0x10]
movzx eax, byte [ebp + edx*4 - 0x480]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x47f]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x47e]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x18]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0x18], eax
cmp eax, ecx
jl 0x1007c0b1
mov eax, dword [ebp - 0x24]
test eax, eax
je 0x1007c23c
cmp dword [esi + 0x10], 0
je 0x1007c236
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1007c236
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 0x1007c23c
add dword [esi + 0xac], eax
inc dword [ebp - 0x14]
mov ecx, dword [esi + 4]
mov edx, ecx
cmp dword [ebp - 0x14], ecx
jl 0x1007c0a0
jmp 0x1007c790
push ebx
call fcn.1012f984
mov ecx, dword [0x1021328c]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_bpp
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.1012f984
mov ecx, dword [0x1021328c]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.invalid
xor eax, eax
mov esp, ebp
pop ebp
ret
sub edi, dword [ebp - 0x34]
xor ebx, ebx
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x2c], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x3c], 0
mov dword [ebp - 0x40], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x14], ebx
sub edi, dword [ebp - 0x28]
je 0x1007c335
test edi, edi
jns 0x1007c2ff
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1007c335
cmp dword [esi + 0x10], ebx
je 0x1007c32f
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, edi
jge 0x1007c32f
sub edi, eax
mov dword [esi + 0xac], edx
mov eax, dword [esi + 0x14]
push edi
push dword [esi + 0x1c]
call eax
mov ecx, dword [ebp - 0x30]
add esp, 8
jmp 0x1007c335
add dword [esi + 0xac], edi
cmp ecx, 0x18
jne 0x1007c341
mov eax, dword [esi]
lea edi, [eax + eax*2]
jmp 0x1007c34e
cmp ecx, 0x10
jne 0x1007c34c
mov edi, dword [esi]
add edi, edi
jmp 0x1007c34e
xor edi, edi
neg edi
and edi, 3
mov dword [ebp - 0x1c], edi
cmp ecx, 0x18
jne 0x1007c367
mov dword [ebp - 0x14], 1
jmp 0x1007c53e
mov edx, dword [ebp - 0xc]
cmp ecx, 0x20
mov edi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x24]
jne 0x1007c3a4
cmp edx, 0xff
jne 0x1007c3a4
cmp edi, 0xff00
jne 0x1007c3a4
cmp ecx, 0xff0000
jne 0x1007c3a4
mov edi, dword [ebp - 0x10]
cmp edi, 0xff000000
jne 0x1007c3c4
mov dword [ebp - 0x14], 2
jmp 0x1007c53b
xor eax, eax
mov dword [ebp - 0x14], eax
test ecx, ecx
je 0x1007c874
test edi, edi
je 0x1007c874
test edx, edx
je 0x1007c874
mov edi, dword [ebp - 0x10]
call fcn.1007b4c0
sub eax, 7
mov dword [ebp - 0x50], 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 - 0x18]
movzx eax, al
mov dword [ebp - 0x38], eax
call fcn.1007b4c0
sub eax, 7
mov dword [ebp - 0x54], 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 - 0xc]
movzx eax, al
mov dword [ebp - 0x3c], eax
call fcn.1007b4c0
sub eax, 7
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0xc]
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, edi
movzx eax, al
mov dword [ebp - 0x40], eax
call fcn.1007b4c0
sub eax, 7
mov edx, edi
mov dword [ebp - 0x2c], eax
mov ecx, edi
and ecx, 0x55555555
shr edx, 1
and edx, 0x55555555
add edx, ecx
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 - 0x38], 8
movzx eax, al
mov dword [ebp - 0x48], eax
ja 0x1007c847
cmp dword [ebp - 0x3c], 8
ja 0x1007c847
cmp dword [ebp - 0x40], 8
ja 0x1007c847
cmp eax, 8
ja 0x1007c847
mov edi, dword [ebp - 0x1c]
mov ecx, dword [esi + 4]
mov edx, ecx
mov dword [ebp - 0x34], ebx
test ecx, ecx
jle 0x1007c78d
nop
cmp dword [ebp - 0x14], 0
mov eax, dword [esi]
mov dword [ebp - 0x28], 0
je 0x1007c698
test eax, eax
jle 0x1007c73f
mov edi, dword [ebp - 0x20]
lea ecx, [esi + 0x20]
mov eax, dword [esi + 0xac]
mov dword [ebp - 8], ecx
cmp eax, dword [esi + 0xb0]
jae 0x1007c58d
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c5b9
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
je 0x1007c5b4
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c5b9
xor dl, dl
mov dword [ebp - 8], ecx
mov byte [edi + ebx + 2], dl
cmp eax, dword [esi + 0xb0]
jae 0x1007c5d0
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c5ef
cmp dword [ecx], 0
je 0x1007c5ed
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c5ef
xor cl, cl
mov byte [edi + ebx + 1], cl
cmp eax, dword [esi + 0xb0]
jae 0x1007c609
mov dl, byte [eax]
lea ecx, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c62e
mov ecx, dword [ebp - 8]
cmp dword [ecx], 0
je 0x1007c62c
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c631
xor dl, dl
mov dword [ebp - 8], ecx
cmp dword [ebp - 0x14], 2
mov byte [ebx + edi], dl
jne 0x1007c674
cmp eax, dword [esi + 0xb0]
jae 0x1007c650
mov dl, byte [eax]
lea ecx, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c677
cmp dword [ecx], 0
je 0x1007c670
mov ecx, esi
call fcn.100725f0
mov eax, dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007c677
xor dl, dl
jmp 0x1007c677
or dl, 0xff
movzx eax, dl
or dword [ebp - 0x44], eax
mov byte [ebx + edi + 3], dl
add ebx, 4
mov edx, dword [ebp - 0x28]
inc edx
mov dword [ebp - 0x28], edx
cmp edx, dword [esi]
jl 0x1007c571
jmp 0x1007c73c
test eax, eax
jle 0x1007c73f
mov edi, dword [ebp - 0x20]
mov ecx, esi
call fcn.100726e0
cmp dword [ebp - 0x30], 0x10
je 0x1007c6c1
mov ecx, esi
mov edi, eax
call fcn.100726e0
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0x20]
push dword [ebp - 0x38]
mov edx, dword [ebp - 0x50]
mov ecx, eax
and ecx, dword [ebp - 0x24]
mov dword [ebp - 8], eax
call fcn.1007b520
mov ecx, dword [ebp - 8]
push dword [ebp - 0x3c]
and ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x54]
mov byte [ebx + edi], al
call fcn.1007b520
mov ecx, dword [ebp - 8]
push dword [ebp - 0x40]
and ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x58]
mov byte [ebx + edi + 1], al
call fcn.1007b520
mov ecx, dword [ebp - 0x10]
add esp, 0xc
mov byte [ebx + edi + 2], al
test ecx, ecx
je 0x1007c71e
push dword [ebp - 0x48]
and ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x2c]
call fcn.1007b520
add esp, 4
jmp 0x1007c723
mov eax, 0xff
or dword [ebp - 0x44], eax
mov byte [ebx + edi + 3], al
add ebx, 4
mov eax, dword [ebp - 0x28]
inc eax
mov dword [ebp - 0x28], eax
cmp eax, dword [esi]
jl 0x1007c6a3
mov edi, dword [ebp - 0x1c]
test edi, edi
je 0x1007c779
cmp dword [esi + 0x10], 0
je 0x1007c773
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edi
jge 0x1007c773
mov dword [esi + 0xac], eax
mov eax, edi
sub eax, ecx
push eax
push dword [esi + 0x1c]
mov eax, dword [esi + 0x14]
call eax
add esp, 8
jmp 0x1007c779
add dword [esi + 0xac], edi
mov eax, dword [ebp - 0x34]
mov ecx, dword [esi + 4]
inc eax
mov dword [ebp - 0x34], eax
mov edx, ecx
cmp eax, ecx
jl 0x1007c550
mov ebx, dword [ebp - 0x20]
cmp dword [ebp - 0x44], 0
jne 0x1007c7b2
mov eax, dword [esi]
imul eax, ecx
lea eax, [eax*4 - 1]
test eax, eax
js 0x1007c7b2
mov byte [ebx + eax], 0xff
sub eax, 4
jns 0x1007c7a6
mov edx, dword [esi + 4]
cmp dword [ebp - 0x4c], 0
jle 0x1007c82f
xor edi, edi
mov dword [ebp - 0x2c], edi
test edx, 0xfffffffe
jle 0x1007c82f
nop dword [eax]
mov ecx, dword [esi]
sub edx, edi
mov eax, ecx
dec edx
imul eax, edi
xor edi, edi
imul edx, ecx
lea eax, [ebx + eax*4]
mov dword [ebp - 0x4c], eax
lea edx, [ebx + edx*4]
lea eax, [ecx*4]
test eax, eax
jle 0x1007c81d
mov ebx, dword [ebp - 0x4c]
sub ebx, edx
nop dword [eax + eax]
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 0x1007c800
mov ebx, dword [ebp - 0x20]
mov edi, dword [ebp - 0x2c]
mov edx, dword [esi + 4]
inc edi
mov eax, edx
mov dword [ebp - 0x2c], edi
sar eax, 1
cmp edi, eax
jl 0x1007c7d0
mov ecx, dword [ebp - 0x5c]
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 dword [ebp - 0x20]
call fcn.1012f984
mov ecx, dword [0x1021328c]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], 0x101b47dc
xor eax, eax
mov esp, ebp
pop ebp
ret
push dword [ebp - 0x20]
call fcn.1012f984
mov ecx, dword [0x1021328c]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1021328c]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b4984
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1021328c]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b4990
xor eax, eax
mov esp, ebp
pop ebp
ret