Function at 0x1007a020
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x484
mov dword [ebp - 0x60], edx
lea edx, [ebp - 0x84]
push esi
mov esi, ecx
mov dword [ebp - 8], 0
mov dword [ebp - 0x68], 0xff
call fcn.10079b30
test eax, eax
je 0x1007a07a
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 0x1007a081
mov ecx, dword [0x1020d31c]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b1560
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
push ebx
mov ebx, dword [esi]
cmp ebx, 0x1000000
jbe 0x1007a0ad
mov ecx, dword [0x1020d31c]
mov eax, dword fs:[0x2c]
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b1554
xor eax, eax
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 0x78]
mov ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp - 0x64]
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x40], eax
push edi
mov edi, dword [ebp - 0x80]
mov dword [ebp - 0x2c], edi
cmp ecx, 0xc
jne 0x1007a108
mov edx, dword [ebp - 0x84]
mov dword [ebp - 0x24], edx
cmp edx, 0x18
jge 0x1007a127
mov ecx, edi
sub ecx, eax
mov eax, 0x55555556
sub ecx, 0x18
imul ecx
mov eax, edx
shr eax, 0x1f
add eax, edx
jmp 0x1007a120
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x24], eax
cmp eax, 0x10
jge 0x1007a127
mov eax, edi
sub eax, dword [ebp - 0x40]
sub eax, ecx
sar eax, 2
mov dword [ebp - 8], eax
test eax, eax
jne 0x1007a18f
mov eax, dword [esi + 0xa8]
sub eax, dword [esi + 0xb4]
add eax, dword [esi + 0xac]
cmp edi, eax
je 0x1007a154
push 0x1515
push 0x101b17d0
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.101311a1
add esp, 0xc
mov ecx, dword [esi + 0xa8]
mov eax, dword [esi + 0xac]
sub ecx, esi
add eax, 0xffffffd8
add eax, ecx
cmp edi, eax
je 0x1007a18d
mov ecx, dword [0x1020d31c]
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 ebx, dword [esi]
cmp dword [ebp - 0x24], 0x18
mov ecx, dword [ebp - 0xc]
jne 0x1007a1a9
cmp ecx, 0xff000000
jne 0x1007a1a7
mov eax, 3
jmp 0x1007a1b3
mov ebx, dword [esi]
xor eax, eax
test ecx, ecx
setne al
add eax, 3
mov dword [esi + 8], eax
mov ecx, dword [esi + 4]
test ebx, ebx
js 0x1007adff
jne 0x1007a1cc
lea edi, [ebx*4]
jmp 0x1007a1ec
mov eax, 0x7fffffff
cdq
idiv ebx
cmp eax, 4
jl 0x1007adff
lea edi, [ebx*4]
test edi, edi
js 0x1007adff
test ecx, ecx
js 0x1007adff
je 0x1007a206
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x1007adff
test ebx, ebx
je 0x1007a21b
mov eax, 0x7fffffff
cdq
idiv ebx
cmp eax, 4
jl 0x1007addd
lea edi, [ebx*4]
test ecx, ecx
je 0x1007a236
mov eax, 0x7fffffff
cdq
idiv ecx
cmp edi, eax
jg 0x1007addd
imul ebx, ecx
lea eax, [ebx*4]
push eax
call fcn.101312a3
mov ebx, eax
add esp, 4
mov dword [ebp - 0x44], ebx
test ebx, ebx
je 0x1007addd
xor edi, edi
cmp dword [ebp - 0x24], 0x10
jge 0x1007a7f8
mov eax, dword [ebp - 8]
test eax, eax
je 0x1007a7cd
cmp eax, 0x100
jg 0x1007a7cd
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x1007a39c
lea ebx, [esi + 0x20]
mov edi, eax
nop dword [eax + eax]
mov eax, dword [esi + 0xac]
cmp eax, dword [esi + 0xb0]
jae 0x1007a2a9
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a2cc
cmp dword [esi + 0x20], 0
lea ebx, [esi + 0x20]
je 0x1007a2ca
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a2cc
xor cl, cl
mov edx, dword [ebp - 0xc]
mov dword [ebp - 0x20], ebx
mov byte [ebp + edx*4 - 0x482], cl
cmp eax, dword [esi + 0xb0]
jae 0x1007a2ec
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a30e
cmp dword [ebx], 0
je 0x1007a30c
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov edx, dword [ebp - 0xc]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a30e
xor cl, cl
mov byte [ebp + edx*4 - 0x483], cl
cmp eax, dword [esi + 0xb0]
jae 0x1007a32b
mov cl, byte [eax]
lea ebx, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a34d
cmp dword [ebx], 0
je 0x1007a34b
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov edx, dword [ebp - 0xc]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a34d
xor cl, cl
cmp dword [ebp - 0x30], 0xc
mov byte [ebp + edx*4 - 0x484], cl
je 0x1007a380
cmp eax, dword [esi + 0xb0]
jae 0x1007a36b
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007a380
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0
je 0x1007a380
mov ecx, esi
call fcn.10070b40
inc dword [esi + 0xac]
mov ecx, dword [ebp - 0xc]
mov byte [ebp + ecx*4 - 0x481], 0xff
inc ecx
mov dword [ebp - 0xc], ecx
cmp ecx, edi
jl 0x1007a290
mov ebx, dword [ebp - 0x44]
xor edi, edi
mov ecx, dword [ebp - 0x2c]
xor eax, eax
cmp dword [ebp - 0x30], 0xc
setne al
add eax, 3
imul eax, dword [ebp - 8]
sub ecx, eax
sub ecx, dword [ebp - 0x40]
sub ecx, dword [ebp - 0x30]
je 0x1007a3ff
test ecx, ecx
jns 0x1007a3cb
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1007a3ff
cmp dword [esi + 0x10], 0
je 0x1007a3f9
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x1007a3f9
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 0x1007a3ff
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x24]
cmp ecx, 1
jne 0x1007a411
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x1007a428
cmp ecx, 4
jne 0x1007a41d
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x1007a428
cmp ecx, 8
jne 0x1007a7a2
mov eax, dword [esi]
mov edx, dword [esi + 4]
neg eax
and eax, 3
cmp ecx, 1
mov dword [ebp - 0x1c], eax
mov ecx, edx
jne 0x1007a5db
mov dword [ebp - 0x34], 0
test edx, edx
jle 0x1007acdf
nop dword [eax]
mov ecx, dword [esi + 0xac]
mov dword [ebp - 0x14], 7
cmp ecx, dword [esi + 0xb0]
jae 0x1007a470
mov dl, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x1007a492
cmp dword [esi + 0x20], 0
je 0x1007a490
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
lea ecx, [eax + 1]
mov dword [esi + 0xac], ecx
jmp 0x1007a492
xor dl, dl
movzx eax, dl
mov dword [ebp - 0x28], eax
mov eax, dword [esi]
mov dword [ebp - 0x18], 0
mov dword [ebp - 0xc], eax
test eax, eax
jle 0x1007a585
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
sar edx, cl
and edx, 1
movzx eax, byte [ebp + edx*4 - 0x484]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x483]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x482]
mov edx, dword [ebp - 0x38]
mov ecx, edx
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0x18]
inc eax
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x18], eax
cmp eax, dword [ebp - 0xc]
je 0x1007a585
sub dword [ebp - 0x14], 1
jns 0x1007a56a
mov dword [ebp - 0x14], 7
cmp edx, dword [esi + 0xb0]
jae 0x1007a52e
mov al, byte [edx]
lea ecx, [edx + 1]
mov byte [ebp - 1], al
mov dl, byte [ebp - 1]
mov eax, dword [ebp - 0x10]
movzx edx, dl
mov dword [esi + 0xac], ecx
mov dword [ebp - 0x28], edx
jmp 0x1007a573
cmp dword [esi + 0x20], 0
je 0x1007a556
mov ecx, esi
call fcn.10070b40
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 - 0x28], edx
jmp 0x1007a573
mov eax, dword [ebp - 0x10]
mov ecx, edx
mov byte [ebp - 1], 0
mov dl, byte [ebp - 1]
movzx edx, dl
mov dword [ebp - 0x28], edx
jmp 0x1007a573
mov ecx, dword [esi + 0xac]
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x18], eax
jl 0x1007a4b2
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1007a5c2
cmp dword [esi + 0x10], 0
je 0x1007a5ba
mov edx, dword [esi + 0xb0]
sub edx, ecx
cmp edx, eax
jge 0x1007a5ba
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 0x1007a5c2
add eax, ecx
mov dword [esi + 0xac], eax
mov eax, dword [ebp - 0x34]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x34], eax
mov ecx, edx
cmp eax, edx
jl 0x1007a450
jmp 0x1007acdf
mov dword [ebp - 8], 0
test edx, edx
jle 0x1007acdf
nop word [eax + eax]
mov ecx, dword [esi]
mov dword [ebp - 0xc], 0
test ecx, ecx
jle 0x1007a751
mov edx, dword [esi + 0xac]
mov dword [ebp - 0x10], edx
cmp edx, dword [esi + 0xb0]
jae 0x1007a620
mov al, byte [edx]
inc edx
mov dword [ebp - 0x10], edx
mov dword [esi + 0xac], edx
jmp 0x1007a64d
cmp dword [esi + 0x20], 0
je 0x1007a64b
mov ecx, esi
call fcn.10070b40
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 - 0x10], edx
mov dword [esi + 0xac], edx
jmp 0x1007a64d
xor al, al
mov ebx, esi
movzx eax, al
mov edx, 0x20
mov dword [ebp - 0x18], eax
add edx, ebx
mov dword [ebp - 0x14], 0
cmp dword [ebp - 0x24], 4
mov ebx, dword [ebp - 0x44]
mov dword [ebp - 0x20], edx
mov edx, dword [ebp - 0x10]
jne 0x1007a67f
mov dword [ebp - 0x14], eax
and dword [ebp - 0x14], 0xf
shr eax, 4
mov dword [ebp - 0x18], eax
movzx eax, byte [ebp + eax*4 - 0x484]
mov byte [edi + ebx], al
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax*4 - 0x483]
mov byte [edi + ebx + 1], al
mov eax, dword [ebp - 0x18]
movzx eax, byte [ebp + eax*4 - 0x482]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0xc]
mov byte [edi + ebx + 3], 0xff
inc eax
add edi, 4
cmp eax, ecx
je 0x1007a74e
cmp dword [ebp - 0x24], 8
jne 0x1007a70c
cmp edx, dword [esi + 0xb0]
jae 0x1007a6e0
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 0x1007a70f
mov eax, dword [ebp - 0x20]
cmp dword [eax], 0
je 0x1007a705
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
mov ecx, dword [esi]
movzx edx, dl
jmp 0x1007a70f
xor dl, dl
movzx edx, dl
jmp 0x1007a70f
mov edx, dword [ebp - 0x14]
movzx eax, byte [ebp + edx*4 - 0x484]
mov byte [edi + ebx], al
movzx eax, byte [ebp + edx*4 - 0x483]
mov byte [edi + ebx + 1], al
movzx eax, byte [ebp + edx*4 - 0x482]
mov byte [edi + ebx + 2], al
mov eax, dword [ebp - 0xc]
add eax, 2
mov byte [edi + ebx + 3], 0xff
add edi, 4
mov dword [ebp - 0x10], ecx
mov dword [ebp - 0xc], eax
cmp eax, ecx
jl 0x1007a601
mov eax, dword [ebp - 0x1c]
test eax, eax
je 0x1007a78c
cmp dword [esi + 0x10], 0
je 0x1007a786
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1007a786
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 - 0x1c]
add esp, 8
jmp 0x1007a78c
add dword [esi + 0xac], eax
inc dword [ebp - 8]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 8], edx
jl 0x1007a5f0
jmp 0x1007acdf
push ebx
call fcn.10130722
mov ecx, dword [0x1020d31c]
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.10130722
mov ecx, dword [0x1020d31c]
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
mov eax, dword [ebp - 0x2c]
sub eax, dword [ebp - 0x40]
mov dword [ebp - 0x50], 0
mov dword [ebp - 0x54], 0
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x48], 0
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x5c], 0
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x18], edi
sub eax, dword [ebp - 0x30]
je 0x1007a886
test eax, eax
jns 0x1007a853
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1007a886
cmp dword [esi + 0x10], edi
je 0x1007a880
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x1007a880
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 0x1007a886
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x24]
cmp ecx, 0x18
jne 0x1007a895
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x1007a8a2
cmp ecx, 0x10
jne 0x1007a8a0
mov eax, dword [esi]
add eax, eax
jmp 0x1007a8a2
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x40], eax
cmp ecx, 0x18
jne 0x1007a8bb
mov dword [ebp - 0x18], 1
jmp 0x1007aa8a
mov edx, dword [ebp - 0x14]
cmp ecx, 0x20
mov ecx, dword [ebp - 0x1c]
jne 0x1007a8f4
cmp edx, 0xff
jne 0x1007a8f4
cmp dword [ebp - 0x10], 0xff00
jne 0x1007a8f4
cmp ecx, 0xff0000
jne 0x1007a8f4
cmp dword [ebp - 0xc], 0xff000000
jne 0x1007a912
mov dword [ebp - 0x18], 2
jmp 0x1007aa8a
xor eax, eax
mov dword [ebp - 0x18], eax
test ecx, ecx
je 0x1007adb2
cmp dword [ebp - 0x10], eax
je 0x1007adb2
test edx, edx
je 0x1007adb2
call fcn.10079a50
sub eax, 7
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x1c]
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.10079a50
sub eax, 7
mov dword [ebp - 0x54], 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 - 0x14]
movzx eax, al
mov dword [ebp - 0x34], eax
call fcn.10079a50
sub eax, 7
mov dword [ebp - 0x58], 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 - 0xc]
movzx eax, al
mov dword [ebp - 0x38], eax
call fcn.10079a50
sub eax, 7
mov dword [ebp - 0x20], 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
cmp dword [ebp - 0x48], 8
movzx eax, al
mov dword [ebp - 0x5c], eax
ja 0x1007ad87
cmp dword [ebp - 0x34], 8
ja 0x1007ad87
cmp dword [ebp - 0x38], 8
ja 0x1007ad87
cmp eax, 8
ja 0x1007ad87
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x30], edi
test edx, edx
jle 0x1007acdf
nop word [eax + eax]
cmp dword [ebp - 0x18], 0
mov eax, dword [esi]
mov dword [ebp - 0x2c], 0
je 0x1007abea
test eax, eax
jle 0x1007ac8e
lea ecx, [esi + 0x20]
nop
mov eax, dword [esi + 0xac]
mov dword [ebp - 8], ecx
cmp eax, dword [esi + 0xb0]
jae 0x1007aadc
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab08
cmp dword [esi + 0x20], 0
lea ecx, [esi + 0x20]
mov dword [ebp - 8], ecx
je 0x1007ab03
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab08
xor dl, dl
mov dword [ebp - 8], ecx
mov dword [ebp - 0x28], ecx
mov byte [edi + ebx + 2], dl
cmp eax, dword [esi + 0xb0]
jae 0x1007ab22
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab44
cmp dword [ecx], 0
je 0x1007ab42
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov ecx, dword [ebp - 8]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab44
xor dl, dl
mov byte [edi + ebx + 1], dl
cmp eax, dword [esi + 0xb0]
jae 0x1007ab5e
mov dl, byte [eax]
lea ecx, [esi + 0x20]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab7d
cmp dword [ecx], 0
je 0x1007ab7b
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007ab80
xor dl, dl
mov dword [ebp - 8], ecx
cmp dword [ebp - 0x18], 2
mov byte [edi + ebx], dl
jne 0x1007abc0
cmp eax, dword [esi + 0xb0]
jae 0x1007ab9c
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007abc3
mov eax, dword [ebp - 0x28]
cmp dword [eax], 0
je 0x1007abbc
mov ecx, esi
call fcn.10070b40
mov eax, dword [esi + 0xac]
mov cl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1007abc3
xor cl, cl
jmp 0x1007abc3
or cl, 0xff
mov edx, dword [ebp - 0x2c]
movzx eax, cl
inc edx
or dword [ebp - 0x3c], eax
mov byte [edi + ebx + 3], cl
add edi, 4
mov ecx, dword [ebp - 8]
mov dword [ebp - 0x2c], edx
cmp edx, dword [esi]
jl 0x1007aac0
mov dword [ebp - 0x28], edi
jmp 0x1007ac8e
test eax, eax
jle 0x1007ac8e
mov ecx, esi
call fcn.10070cd0
cmp dword [ebp - 0x24], 0x10
je 0x1007ac10
mov ecx, esi
mov edi, eax
call fcn.10070cd0
shl eax, 0x10
add eax, edi
mov edi, dword [ebp - 0x28]
push dword [ebp - 0x48]
mov edx, dword [ebp - 0x50]
mov ecx, eax
and ecx, dword [ebp - 0x1c]
mov dword [ebp - 8], eax
call fcn.10079ab0
mov ecx, dword [ebp - 8]
push dword [ebp - 0x34]
and ecx, dword [ebp - 0x10]
mov edx, dword [ebp - 0x54]
mov byte [edi + ebx], al
call fcn.10079ab0
mov ecx, dword [ebp - 8]
push dword [ebp - 0x38]
and ecx, dword [ebp - 0x14]
mov edx, dword [ebp - 0x58]
mov byte [edi + ebx + 1], al
call fcn.10079ab0
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov byte [edi + ebx + 2], al
test ecx, ecx
je 0x1007ac6d
push dword [ebp - 0x5c]
and ecx, dword [ebp - 8]
mov edx, dword [ebp - 0x20]
call fcn.10079ab0
add esp, 4
jmp 0x1007ac72
mov eax, 0xff
or dword [ebp - 0x3c], eax
mov byte [edi + ebx + 3], al
add edi, 4
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x28], edi
mov dword [ebp - 0x2c], eax
cmp eax, dword [esi]
jl 0x1007abf2
mov edx, dword [ebp - 0x40]
test edx, edx
je 0x1007accb
cmp dword [esi + 0x10], 0
je 0x1007acc5
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x1007acc5
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 0x1007accb
add dword [esi + 0xac], edx
mov eax, dword [ebp - 0x30]
mov edx, dword [esi + 4]
inc eax
mov dword [ebp - 0x30], eax
mov ecx, edx
cmp eax, edx
jl 0x1007aaa0
cmp dword [ebp - 0x3c], 0
jne 0x1007ad01
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x1007ad01
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x1007acf5
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x4c], 0
jle 0x1007ad6f
xor edi, edi
mov dword [ebp - 0x20], edi
test ecx, 0xfffffffe
jle 0x1007ad6f
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, [ecx + ebx]
test eax, eax
jle 0x1007ad5d
mov ebx, dword [ebp - 0x4c]
sub ebx, ecx
nop
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 0x1007ad40
mov ebx, dword [ebp - 0x44]
mov edi, dword [ebp - 0x20]
mov ecx, dword [esi + 4]
inc edi
mov eax, ecx
mov dword [ebp - 0x20], edi
sar eax, 1
cmp edi, eax
jl 0x1007ad18
mov ecx, dword [ebp - 0x60]
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.10130722
mov ecx, dword [0x1020d31c]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0xc], 0x101b16c0
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.10130722
mov ecx, dword [0x1020d31c]
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 [0x1020d31c]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b1854
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1020d31c]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0xc], 0x101b1834
xor eax, eax
mov esp, ebp
pop ebp
ret