Function at 0x10036d00
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.10036780
test eax, eax
je 0x10036d60
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 0x10036d67
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9f74
xor eax, eax
pop esi
mov esp, ebp
pop ebp
ret
cmp dword [esi], 0x1000000
jbe 0x10036d8f
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9efc
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 0x10036e03
mov ebx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ebx
cmp ebx, 0x18
jge 0x10036e21
mov ecx, edi
mov eax, 0x55555556
sub ecx, edx
sub ecx, 0x18
imul ecx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x10036e1a
mov ecx, dword [ebp - 0xa8]
mov dword [ebp - 0x2c], ecx
cmp ecx, 0x10
jge 0x10036e21
mov ebx, edi
sub ebx, edx
sub ebx, eax
sar ebx, 2
mov dword [ebp - 0x14], ebx
test ebx, ebx
jne 0x10036e8b
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 0x10036e5e
push 0x1515
push 0x100f9f08
push str.info.offset__s__callback_already_read___int___s__img_buffer___s__img_buffer_original_
call fcn.100b8ede
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 0x10036e8b
mov ecx, dword [0x1012c888]
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 0x10036ea3
cmp ecx, 0xff000000
jne 0x10036ea3
mov eax, 3
jmp 0x10036ead
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 0x10038052
jne 0x10036ec8
lea edi, [ecx*4]
jmp 0x10036eea
mov eax, 0x7fffffff
cdq
idiv ecx
cmp eax, 4
jl 0x10038052
lea edi, [ecx*4]
mov eax, edi
test eax, eax
js 0x10038052
test ebx, ebx
js 0x10038052
je 0x10036f04
mov eax, 0x7fffffff
cdq
idiv ebx
cmp edi, eax
jg 0x10038052
test ecx, ecx
je 0x10036f22
xor edx, edx
mov eax, 0x7fffffff
div ecx
cmp eax, 4
jl 0x10038030
test edi, edi
js 0x10038030
test ebx, ebx
je 0x10036f37
xor edx, edx
mov eax, 0x7fffffff
div ebx
cmp edi, eax
jg 0x10038030
imul ecx, ebx
shl ecx, 2
push ecx
call fcn.100ba9bb
mov ebx, eax
add esp, 4
mov dword [ebp - 0x48], ebx
test ebx, ebx
je 0x10038030
xor edi, edi
cmp dword [ebp - 0x2c], 0x10
jge 0x10037739
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x1003770e
cmp eax, 0x100
jg 0x1003770e
mov dword [ebp - 0xc], edi
test eax, eax
jle 0x100371c9
mov eax, dword [esi + 0xac]
lea ebx, [esi + 0xac]
xor edx, edx
nop
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10036fa6
mov dl, byte [eax]
lea edi, [eax + 1]
mov byte [ebp - 1], dl
mov eax, edi
jmp 0x10036ff9
cmp dword [esi + 0x20], 0
je 0x1003702e
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 0x10036fe4
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [edi], al
jmp 0x10036fef
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 0x10037043
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
lea ebx, [esi + 0xac]
jmp 0x10037097
shl edx, 2
mov dword [ebp - 0x10], edx
mov byte [ebp + edx - 0x4a6], 0
mov edx, ecx
mov ecx, dword [ebp - 0x10]
jmp 0x10037046
mov ecx, dword [ebp - 0x38]
cmp dword [esi + 0x20], 0
je 0x100370c5
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 0x10037081
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x1003708c
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 0x100370cd
mov cl, byte [eax]
inc eax
mov byte [ebp - 1], cl
mov dword [ebx], eax
jmp 0x1003712a
mov byte [ebp + ecx - 0x4a7], 0
cmp dword [esi + 0x20], 0
je 0x10037126
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 0x1003710f
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 0x1003712a
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 0x1003712a
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 0x100371a8
cmp eax, edx
jae 0x1003714c
inc eax
mov dword [ebx], eax
jmp 0x100371a8
cmp dword [esi + 0x20], 0
je 0x100371a8
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 0x1003718b
mov dword [esi + 0x20], eax
lea eax, [esi + 0x29]
mov dword [esi + 0xb0], eax
mov byte [edi], 0
jmp 0x10037196
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 0x10036f90
mov ebx, dword [ebp - 0x48]
xor edi, edi
jmp 0x100371cc
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 0x1003722e
test ecx, ecx
jns 0x100371fa
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x1003722e
cmp dword [esi + 0x10], 0
je 0x10037228
mov edx, dword [esi + 0xb0]
mov eax, edx
sub eax, dword [esi + 0xac]
cmp eax, ecx
jge 0x10037228
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 0x1003722e
add dword [esi + 0xac], ecx
mov ecx, dword [ebp - 0x2c]
cmp ecx, 1
jne 0x10037240
mov eax, dword [esi]
add eax, 7
shr eax, 3
jmp 0x10037257
cmp ecx, 4
jne 0x1003724c
mov eax, dword [esi]
inc eax
shr eax, 1
jmp 0x10037257
cmp ecx, 8
jne 0x100376e3
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 0x100374b0
mov dword [ebp - 8], 0
test edx, edx
jle 0x10037f2e
nop dword [eax]
mov eax, dword [esi + 0xac]
mov ecx, 7
mov dword [ebp - 0x14], ecx
cmp eax, dword [esi + 0xb0]
jae 0x100372a1
mov dl, byte [eax]
inc eax
mov dword [esi + 0xac], eax
jmp 0x1003730e
cmp dword [esi + 0x20], 0
je 0x1003730c
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 0x100372f0
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 0x1003730e
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 0x1003730e
xor dl, dl
movzx eax, dl
mov edx, dword [esi]
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0xc], 0
test edx, edx
jle 0x1003745c
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 0x1003745c
mov ecx, dword [ebp - 0x14]
sub ecx, 1
mov dword [ebp - 0x14], ecx
jns 0x1003744e
mov eax, dword [esi + 0xac]
mov dword [ebp - 0x14], 7
cmp eax, dword [esi + 0xb0]
jae 0x100373ba
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 0x10037451
cmp dword [esi + 0x20], 0
je 0x1003743b
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 0x10037414
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 0x10037451
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 0x10037451
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 0x10037451
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x18], edx
cmp eax, edx
jl 0x10037330
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x10037497
cmp dword [esi + 0x10], 0
je 0x10037491
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x10037491
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 0x10037497
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 0x10037280
jmp 0x10037f2e
mov dword [ebp - 0x30], 0
test edx, edx
jle 0x10037f2e
nop
cmp dword [esi], 0
mov dword [ebp - 0x20], 0
jle 0x10037692
mov ecx, dword [esi + 0xac]
mov edx, dword [esi + 0xb0]
cmp ecx, edx
jae 0x100374eb
mov al, byte [ecx]
inc ecx
mov dword [esi + 0xac], ecx
jmp 0x1003754e
cmp dword [esi + 0x20], 0
je 0x1003754c
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 0x10037533
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 0x1003754e
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 0x1003754e
xor al, al
cmp dword [ebp - 0x2c], 4
movzx eax, al
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x18], 0
jne 0x1003756e
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 0x1003768f
cmp dword [ebp - 0x2c], 8
jne 0x1003764d
cmp ecx, edx
jae 0x100375d4
mov dl, byte [ecx]
lea eax, [ecx + 1]
mov ecx, dword [ebp - 0xc]
mov dword [esi + 0xac], eax
movzx edx, dl
jmp 0x10037653
cmp dword [esi + 0x20], 0
je 0x10037643
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 0x10037625
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 0x10037653
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 0x10037653
mov ecx, dword [ebp - 0xc]
xor dl, dl
movzx edx, dl
jmp 0x10037653
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 0x100374d0
mov eax, dword [ebp - 0x34]
test eax, eax
je 0x100376cd
cmp dword [esi + 0x10], 0
je 0x100376c7
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x100376c7
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 0x100376cd
add dword [esi + 0xac], eax
inc dword [ebp - 0x30]
mov edx, dword [esi + 4]
mov ecx, edx
cmp dword [ebp - 0x30], edx
jl 0x100374c0
jmp 0x10037f2e
push ebx
call fcn.100b90da
mov ecx, dword [0x1012c888]
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.100b90da
mov ecx, dword [0x1012c888]
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 0x100377c1
test eax, eax
jns 0x1003778e
mov eax, dword [esi + 0xb0]
mov dword [esi + 0xac], eax
jmp 0x100377c1
cmp dword [esi + 0x10], edi
je 0x100377bb
mov edx, dword [esi + 0xb0]
mov ecx, edx
sub ecx, dword [esi + 0xac]
cmp ecx, eax
jge 0x100377bb
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 0x100377c1
add dword [esi + 0xac], eax
mov ecx, dword [ebp - 0x2c]
cmp ecx, 0x18
jne 0x100377d0
mov eax, dword [esi]
lea eax, [eax + eax*2]
jmp 0x100377dd
cmp ecx, 0x10
jne 0x100377db
mov eax, dword [esi]
add eax, eax
jmp 0x100377dd
xor eax, eax
neg eax
and eax, 3
mov dword [ebp - 0x80], eax
cmp ecx, 0x18
jne 0x100377f8
mov dword [ebp - 0x54], 1
xor eax, eax
jmp 0x100379c6
mov edx, dword [ebp - 0x18]
cmp ecx, 0x20
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x3c]
jne 0x10037834
cmp edx, 0xff
jne 0x10037834
cmp eax, 0xff00
jne 0x10037834
cmp ecx, 0xff0000
jne 0x10037834
cmp dword [ebp - 0x44], 0xff000000
jne 0x1003784c
mov dword [ebp - 0x54], 2
xor eax, eax
jmp 0x100379c6
test ecx, ecx
je 0x10038005
test eax, eax
je 0x10038005
test edx, edx
je 0x10038005
call fcn.10036720
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.10036720
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.10036720
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.10036720
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 0x10037fda
cmp dword [ebp - 0x4c], 8
ja 0x10037fda
mov eax, dword [ebp - 0x20]
cmp eax, 8
ja 0x10037fda
cmp ecx, 8
ja 0x10037fda
mov edx, dword [esi + 4]
mov ecx, edx
mov dword [ebp - 0x38], edi
test edx, edx
jle 0x10037f2e
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 0x10037c7a
mov dword [ebp - 8], 0
test eax, eax
jle 0x10037edd
lea edx, [esi + 0xac]
mov eax, dword [edx]
mov ecx, dword [esi + 0xb0]
cmp eax, ecx
jae 0x10037a56
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10037ab3
cmp dword [esi + 0x20], 0
je 0x10037adc
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 0x10037a9f
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10037aaa
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 0x10037ae1
mov bl, byte [eax]
inc eax
mov byte [ebp - 1], bl
jmp 0x10037b3e
mov byte [ebx + edi + 2], 0
cmp dword [esi + 0x20], 0
je 0x10037b66
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 0x10037b2a
lea ecx, [esi + 0x29]
mov dword [esi + 0x20], eax
mov dword [esi + 0xb0], ecx
mov byte [esi + 0x28], al
jmp 0x10037b35
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 0x10037b6b
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10037bd0
mov byte [ebx + edi + 1], 0
cmp dword [esi + 0x20], 0
je 0x10037bce
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 0x10037bb9
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 0x10037bd0
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 0x10037bd0
xor cl, cl
cmp dword [ebp - 0x54], 2
mov byte [edi + ebx], cl
jne 0x10037c53
cmp eax, dword [esi + 0xb0]
jae 0x10037bec
mov cl, byte [eax]
inc eax
mov dword [edx], eax
jmp 0x10037c56
cmp dword [esi + 0x20], 0
je 0x10037c4f
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 0x10037c3a
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 0x10037c56
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 0x10037c56
xor cl, cl
jmp 0x10037c56
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 0x10037a42
mov dword [ebp - 0x10], edi
jmp 0x10037edd
mov dword [ebp - 0x24], 0
test eax, eax
jle 0x10037edd
nop dword [eax]
mov ecx, esi
call fcn.1002cf30
cmp dword [ebp - 0x2c], 0x10
mov edi, eax
je 0x10037cb0
mov ecx, esi
call fcn.1002cf30
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 0x10037ced
push 0x148e
push 0x100f9d40
push str.v___256
call fcn.100b8ede
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 0x10037d1a
push 0x1490
push 0x100f9ca0
push str.bits___0__bits___8
call fcn.100b8ede
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x14]
mov eax, dword [ecx*4 + 0x101173b4]
mov ecx, dword [ecx*4 + 0x101173d8]
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 0x10037d74
push 0x148e
push 0x100f9d40
push str.v___256
call fcn.100b8ede
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 0x10037da1
push 0x1490
push 0x100f9ca0
push str.bits___0__bits___8
call fcn.100b8ede
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x4c]
mov eax, dword [ecx*4 + 0x101173b4]
mov ecx, dword [ecx*4 + 0x101173d8]
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 0x10037dfb
push 0x148e
push 0x100f9d40
push str.v___256
call fcn.100b8ede
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 0x10037e28
push 0x1490
push 0x100f9ca0
push str.bits___0__bits___8
call fcn.100b8ede
mov edx, dword [ebp - 8]
add esp, 0xc
mov ecx, dword [ebp - 0x20]
mov eax, dword [ecx*4 + 0x101173b4]
mov ecx, dword [ecx*4 + 0x101173d8]
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 0x10037ebc
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 0x10037e80
push 0x148e
push 0x100f9d40
push str.v___256
call fcn.100b8ede
add esp, 0xc
mov ecx, dword [ebp - 0x7c]
shr edi, cl
mov ecx, dword [ebp - 0xc]
cmp ecx, 8
jbe 0x10037ea7
push 0x1490
push 0x100f9ca0
push str.bits___0__bits___8
call fcn.100b8ede
mov ecx, dword [ebp - 0xc]
add esp, 0xc
mov eax, dword [ecx*4 + 0x101173b4]
mov ecx, dword [ecx*4 + 0x101173d8]
imul eax, edi
sar eax, cl
jmp 0x10037ec1
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 0x10037c90
mov edx, dword [ebp - 0x80]
test edx, edx
je 0x10037f1a
cmp dword [esi + 0x10], 0
je 0x10037f14
mov eax, dword [esi + 0xb0]
mov ecx, eax
sub ecx, dword [esi + 0xac]
cmp ecx, edx
jge 0x10037f14
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 0x10037f1a
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 0x10037a21
cmp dword [ebp - 0x50], 0
jne 0x10037f50
mov eax, dword [esi]
imul eax, edx
lea eax, [eax*4 - 1]
test eax, eax
js 0x10037f50
mov byte [eax + ebx], 0xff
sub eax, 4
jns 0x10037f44
mov ecx, dword [esi + 4]
cmp dword [ebp - 0x5c], 0
jle 0x10037fbf
xor edi, edi
mov dword [ebp - 0x38], edi
test ecx, 0xfffffffe
jle 0x10037fbf
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 0x10037fad
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 0x10037f90
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 0x10037f63
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.100b90da
mov ecx, dword [0x1012c888]
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.100b90da
mov ecx, dword [0x1012c888]
add esp, 4
mov eax, dword fs:[0x2c]
pop edi
mov eax, dword [eax + ecx*4]
pop ebx
pop esi
mov dword [eax + 0x10], 0x100f9fb0
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9e30
xor eax, eax
mov esp, ebp
pop ebp
ret
mov ecx, dword [0x1012c888]
mov eax, dword fs:[0x2c]
pop edi
pop ebx
pop esi
mov eax, dword [eax + ecx*4]
mov dword [eax + 0x10], 0x100f9e24
xor eax, eax
mov esp, ebp
pop ebp
ret