Function at 0x100371f0
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.10036c70
test eax, eax
je 0x10037250
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 0x10037257
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fafb4
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
jbe 0x1003727f
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100faf24
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 0x100372f3
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x10037311
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x1003730a
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x10037311
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x1003737b
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 0x1003734e
push 0x1515
push 0x100fb030
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100ba3be
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 0x1003737b
mov ecx, dword [0x1012e948]
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 0x10037393
cmp ecx, 0xff000000
jne 0x10037393
mov eax, 3
jmp 0x1003739d
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 0x10038542
jne 0x100373b8
lea edi, [ecx*4]
jmp 0x100373da
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x10038542
lea edi, [ecx*4]
mov eax, edi
test eax, eax
js 0x10038542
test ebx, ebx
js 0x10038542
je 0x100373f4
mov eax, 0x7fffffff
cdq
idiv ebx
cmp edi, eax
jg 0x10038542
test ecx, ecx
je 0x10037412
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp eax, 4
jl 0x10038520
test edi, edi
js 0x10038520
test ebx, ebx
je 0x10037427
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp edi, eax
jg 0x10038520
imul ecx, ebx
shl ecx, 2
push ecx
call fcn.100bbe9b
mov ebx, eax
add esp, 4
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x10038520
xor edi, edi
cmp dword [ebp - 0x2c], 0x10
jge 0x10037c29
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x10037bfe
cmp eax, 0x100
jg 0x10037bfe
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x100376b9
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
nop
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10037496
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x100374e9
cmp dword [esi + 0x20], 0
je 0x1003751e
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 0x100374d4
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x100374df
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 0x10037533
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x10037587
shl edx, 2
mov dword [ebp - 0x10], edx
mov byte [ebp + edx - 0x4a6], 0
mov edx, ecx
mov ecx, dword [ebp - 0x10]
jmp 0x10037536
mov ecx, dword [ebp - 0x38]
cmp dword [esi + 0x20], 0
je 0x100375b5
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 0x10037571
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1003757c
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 0x100375bd
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x1003761a
mov byte [ebp + ecx - 0x4a7], 0
cmp dword [esi + 0x20], 0
je 0x10037616
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 0x100375ff
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 0x1003761a
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 0x1003761a
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 0x10037698
cmp eax, edx
jae 0x1003763c
inc eax
mov dword [ebx], eax
jmp 0x10037698
cmp dword [esi + 0x20], 0
je 0x10037698
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 0x1003767b
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x10037686
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 0x10037480
mov ebx, dword [ebp - 0x48]
xor edi, edi
jmp 0x100376bc
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 0x1003771e
test ecx, ecx
jns 0x100376ea
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1003771e
cmp dword [esi + 0x10], 0
je 0x10037718
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x10037718
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 0x1003771e
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 1
jne 0x10037730
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x10037747
cmp ecx, 4
jne 0x1003773c
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x10037747
cmp ecx, 8
jne 0x10037bd3
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 0x100379a0
mov dword [ebp - 8], 0
test edx, edx
jle 0x1003841e
nop dword [eax]
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 0x14], ecx
cmp eax, dword [esi + 0xb0]
jae 0x10037791
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x100377fe
cmp dword [esi + 0x20], 0
je 0x100377fc
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 0x100377e0
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 0x100377fe
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 0x100377fe
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 0
test edx, edx
jle 0x1003794c
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 0x1003794c
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jns 0x1003793e
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x14], 7
cmp eax, dword [esi + 0xb0]
jae 0x100378aa
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 0x10037941
cmp dword [esi + 0x20], 0
je 0x1003792b
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 0x10037904
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 0x10037941
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 0x10037941
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 0x10037941
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], edx
cmp eax, edx
jl 0x10037820
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10037987
cmp dword [esi + 0x10], 0
je 0x10037981
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037981
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 0x10037987
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 0x10037770
jmp 0x1003841e
mov dword [ebp - 0x30], 0
test edx, edx
jle 0x1003841e
nop
cmp dword [esi], 0
mov dword [ebp - 0x20], 0
jle 0x10037b82
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x100379db
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x10037a3e
cmp dword [esi + 0x20], 0
je 0x10037a3c
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 0x10037a23
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 0x10037a3e
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 0x10037a3e
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
jne 0x10037a5e
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 0x10037b7f
cmp dword [ebp - 0x2c], 8
jne 0x10037b3d
cmp ecx, edx
jae 0x10037ac4
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x10037b43
cmp dword [esi + 0x20], 0
je 0x10037b33
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 0x10037b15
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 0x10037b43
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 0x10037b43
mov ecx, dword [ebp - 0xc]
xor dl, dl
movzx edx, dl
jmp 0x10037b43
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 0x100379c0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10037bbd
cmp dword [esi + 0x10], 0
je 0x10037bb7
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037bb7
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 0x10037bbd
add dword [esi + 0xac], eax
inc dword [ebp - 0x30]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 0x30], edx
jl 0x100379b0
jmp 0x1003841e
push ebx
call fcn.100ba5ba
mov ecx, dword [0x1012e948]
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.100ba5ba
mov ecx, dword [0x1012e948]
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 0x10037cb1
test eax, eax
jns 0x10037c7e
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x10037cb1
cmp dword [esi + 0x10], edi
je 0x10037cab
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037cab
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 0x10037cb1
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x10037cc0
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x10037ccd
cmp ecx, 0x10
jne 0x10037ccb
mov eax, dword [esi]
add eax, eax
jmp 0x10037ccd
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x80], eax
cmp ecx, 0x18
jne 0x10037ce8
mov dword [ebp - 0x54], 1
xor eax, eax
jmp 0x10037eb6
mov edx, dword [ebp - 0x18]
cmp ecx, 0x20
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
jne 0x10037d24
cmp edx, 0xff
jne 0x10037d24
cmp eax, 0xff00
jne 0x10037d24
cmp ecx, 0xff0000
jne 0x10037d24
cmp dword [ebp - 0x44], 0xff000000
jne 0x10037d3c
mov dword [ebp - 0x54], 2
xor eax, eax
jmp 0x10037eb6
test ecx, ecx
je 0x100384f5
test eax, eax
je 0x100384f5
test edx, edx
je 0x100384f5
call fcn.10036c10
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.10036c10
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.10036c10
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.10036c10
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 0x100384ca
cmp dword [ebp - 0x4c], 8
ja 0x100384ca
mov eax, dword [ebp - 0x20]
cmp eax, 8
ja 0x100384ca
cmp ecx, 8
ja 0x100384ca
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x38], edi
test edx, edx
jle 0x1003841e
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 0x1003816a
mov dword [ebp - 8], 0
test eax, eax
jle 0x100383cd
lea edx, [esi + 0xac]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10037f46
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10037fa3
cmp dword [esi + 0x20], 0
je 0x10037fcc
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 0x10037f8f
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10037f9a
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 0x10037fd1
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x1003802e
mov byte [ebx + edi + 2], 0
cmp dword [esi + 0x20], 0
je 0x10038056
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 0x1003801a
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10038025
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 0x1003805b
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x100380c0
mov byte [ebx + edi + 1], 0
cmp dword [esi + 0x20], 0
je 0x100380be
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 0x100380a9
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 0x100380c0
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 0x100380c0
xor cl, cl
cmp dword [ebp - 0x54], 2
mov byte [edi + ebx], cl
jne 0x10038143
cmp eax, dword [esi + 0xb0]
jae 0x100380dc
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10038146
cmp dword [esi + 0x20], 0
je 0x1003813f
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 0x1003812a
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 0x10038146
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 0x10038146
xor cl, cl
jmp 0x10038146
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 0x10037f32
mov dword [ebp - 0x10], edi
jmp 0x100383cd
mov dword [ebp - 0x24], 0
test eax, eax
jle 0x100383cd
nop dword [eax]
mov ecx, esi
call fcn.1002d430
cmp dword [ebp - 0x2c], 0x10
mov edi, eax
je 0x100381a0
mov ecx, esi
call fcn.1002d430
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 0x100381dd
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3be
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 0x1003820a
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3be
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
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 0x10038264
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3be
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 0x10038291
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3be
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
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 0x100382eb
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3be
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 0x10038318
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3be
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
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 0x100383ac
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 0x10038370
push 0x148e
push 0x100fafc0
push str.v___256
call fcn.100ba3be
add esp, 0xc
mov ecx, dword [ebp - 0x7c]
shr edi, cl
mov ecx, dword [ebp - 0xc]
cmp ecx, 8
jbe 0x10038397
push 0x1490
push 0x100faf30
push str.bits___0__bits___8
call fcn.100ba3be
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ecx*4 + 0x10118a60]
mov ecx, dword [ecx*4 + 0x10118a84]
imul eax, edi
sar eax, cl
jmp 0x100383b1
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 0x10038180
mov edx, dword [ebp - 0x80]
test edx, edx
je 0x1003840a
cmp dword [esi + 0x10], 0
je 0x10038404
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x10038404
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 0x1003840a
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 0x10037f11
cmp dword [ebp - 0x50], 0
jne 0x10038440
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x10038440
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x10038434
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x5c], 0
jle 0x100384af
xor edi, edi
mov dword [ebp - 0x38], edi
test ecx, 0xfffffffe
jle 0x100384af
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 0x1003849d
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 0x10038480
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 0x10038453
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.100ba5ba
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], str.bad_masks
xor eax, eax
mov esp, ebp
pop ebp
ret
push ebx
call fcn.100ba5ba
mov ecx, dword [0x1012e948]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], 0x100fb024
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fb0dc
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012e948]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100fb0d0
xor eax, eax
mov esp, ebp
pop ebp
ret