Function at 0x4069e0
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0x3c
push esi
mov esi, ecx
mov ecx, dword [esi + 0xc]
mov eax, dword [ecx]
mov edx, eax
test eax, eax
jne 0x406a05
cmp dword [esi + 0x394], 1
setg al
mov dword [esi + 0x398], eax
mov eax, dword [ecx]
mov edx, eax
test edx, edx
je 0x406a1d
cmp dword [esi + 0x394], 0
jne 0x406a1d
mov eax, dword [esi + 0x398]
pop esi
add esp, 0x3c
ret
test eax, eax
jne 0x406a32
mov eax, dword [esi + 0x39c]
test eax, eax
jle 0x406a32
dec eax
mov dword [esi + 0x39c], eax
cmp dword [esi + 0x39c], 0
jg 0x406a12
cmp dword [ecx], 0
push ebx
push ebp
push edi
jne 0x406e05
mov ecx, dword [esi + 0x394]
test ecx, ecx
jne 0x406b3f
mov ecx, dword [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov edi, dword [ecx]
mov ebx, dword [ecx + 0xc]
dec edi
xor ecx, ecx
lea eax, [edx - 4]
and eax, edi
cmp byte [eax + ebx], 0xff
jne 0x406b37
lea eax, [edx - 3]
and eax, edi
cmp byte [eax + ebx], 0xd8
jne 0x406b37
lea eax, [edx - 2]
and eax, edi
cmp byte [eax + ebx], 0xff
jne 0x406b37
lea eax, [edx - 1]
and eax, edi
mov al, byte [eax + ebx]
and al, 0xf0
cmp al, 0xe0
jne 0x406b37
mov eax, dword [esi + 0x3d4]
mov dword [esi + 0x394], 1
mov dword [esi + 0x3e8], ecx
mov dword [esi + 0x3e4], ecx
lea eax, [eax + eax*2]
mov dword [esi + 0x3a8], ecx
shl eax, 2
push eax
push ecx
mov dword [esi + 0x3bc], ecx
mov dword [esi + 0x3a0], ecx
mov dword [esi + 0x3a4], ecx
mov dword [esi + 0x39c], ecx
mov dword [esi + 0x490], ecx
mov dword [esi + 0x3d0], ecx
mov dword [esi + 0x3c8], ecx
mov dword [esi + 0x3c4], ecx
mov dword [esi + 0x3c0], ecx
mov dword [esi + 0x3cc], 0xffffffff
push dword [esi + 0x3e0]
call fcn.00401670
mov eax, dword [esi + 0x45c]
shl eax, 2
push eax
push 0
push dword [esi + 0x468]
call fcn.00401670
mov ecx, dword [esi + 0x394]
add esp, 0x18
test ecx, ecx
je 0x4093eb
mov edx, dword [esi + 0x3a8]
test edx, edx
je 0x406b7a
mov ecx, dword [esi + 0x10]
mov edi, dword [ecx + 0x10]
mov ebx, dword [ecx]
mov ecx, dword [ecx + 0xc]
dec ebx
lea eax, [edi - 2]
and eax, ebx
cmp byte [eax + ecx], 0xff
jne 0x406b76
lea eax, [edi - 1]
and eax, ebx
mov al, byte [eax + ecx]
test al, al
je 0x406b76
and al, 0xf8
cmp al, 0xd0
jne 0x4093e1
test edx, edx
jne 0x406bcf
cmp dword [esi + 0x39c], 0
jne 0x406bcf
mov ecx, dword [esi + 0x10]
mov edx, dword [ecx + 0x10]
mov edi, dword [ecx]
mov ebx, dword [ecx + 0xc]
dec edi
lea eax, [edx - 4]
and eax, edi
cmp byte [eax + ebx], 0xff
jne 0x406bcf
lea eax, [edx - 3]
and eax, edi
mov cl, byte [eax + ebx]
mov al, cl
and al, 0xf0
cmp al, 0xe0
je 0x406baf
cmp cl, 0xfe
jne 0x406bcf
lea eax, [edx - 2]
and eax, edi
movzx ecx, byte [eax + ebx]
lea eax, [edx - 1]
and eax, edi
shl ecx, 8
movzx eax, byte [eax + ebx]
add eax, 2
add eax, ecx
mov dword [esi + 0x39c], eax
mov edx, dword [esi + 0x10]
mov edi, dword [edx + 0x10]
mov ecx, dword [edx]
mov ebp, ecx
mov ebx, dword [edx + 0xc]
mov dword [esp + 0x14], edi
lea eax, [edi - 5]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x30], eax
lea eax, [ecx - 1]
mov dword [esp + 0x28], eax
and eax, dword [esp + 0x30]
cmp byte [eax + ebx], 0xff
jne 0x406cae
lea eax, [edi - 4]
mov dword [esp + 0x14], edi
and eax, dword [esp + 0x28]
mov dword [esp + 0x18], ebx
cmp byte [eax + ebx], 0xda
jne 0x406cae
mov ebp, dword [esp + 0x28]
lea eax, [edi - 3]
and eax, ebp
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
movzx ecx, byte [eax + ebx]
lea eax, [edi - 2]
and eax, ebp
shl ecx, 8
movzx eax, byte [eax + ebx]
add eax, ecx
mov ecx, dword [edx]
mov dword [esp + 0x28], eax
lea eax, [edi - 1]
and eax, ebp
mov ebp, ecx
mov al, byte [eax + ebx]
mov byte [esp + 0x13], al
movzx eax, al
lea eax, [eax*2 + 6]
cmp dword [esp + 0x28], eax
jne 0x406cae
mov al, byte [esp + 0x13]
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
test al, al
je 0x406cae
mov dword [esp + 0x14], edi
mov dword [esp + 0x18], ebx
cmp al, 4
ja 0x406cae
mov ecx, dword [esp + 0x28]
lea eax, [edi - 5]
mov dword [esi + 0x3a4], eax
add ecx, 2
add eax, ecx
mov dword [esi + 0x394], 2
mov dword [esi + 0x3a8], eax
mov ecx, dword [edx + 0x10]
mov eax, dword [edx + 0xc]
mov ebp, dword [edx]
mov dword [esp + 0x14], ecx
mov dword [esp + 0x18], eax
mov ebx, dword [esp + 0x14]
mov edi, edx
lea edx, [ebp - 1]
mov ecx, ebp
lea eax, [ebx - 4]
and eax, edx
mov edx, dword [esp + 0x18]
cmp byte [eax + edx], 0xff
mov edx, dword [esi + 0x10]
jne 0x406d07
lea eax, [ebx - 3]
mov edi, edx
lea ebx, [ebp - 1]
and eax, ebx
mov ebx, dword [esp + 0x18]
cmp byte [eax + ebx], 0xc4
jne 0x406d07
mov ebx, dword [esi + 0x3bc]
cmp ebx, 8
jge 0x406d07
lea eax, [ebx + 1]
mov dword [esi + 0x3bc], eax
mov ecx, dword [edx + 0x10]
mov eax, dword [esi + 0x3b8]
sub ecx, 4
mov dword [eax + ebx*4], ecx
mov edi, dword [esi + 0x10]
mov ecx, dword [edi]
mov edx, dword [edi + 0x10]
mov ebx, edx
mov ebp, dword [edi + 0xc]
lea eax, [edx - 4]
mov dword [esp + 0x24], eax
lea eax, [ecx - 1]
mov dword [esp + 0x28], eax
and eax, dword [esp + 0x24]
cmp byte [eax + ebp], 0xff
jne 0x406d46
lea eax, [edx - 3]
and eax, dword [esp + 0x28]
cmp byte [eax + ebp], 0xc0
jne 0x406d46
mov eax, dword [esp + 0x24]
mov dword [esi + 0x3a0], eax
mov ebx, dword [edi + 0x10]
mov ecx, dword [edi]
mov ebp, dword [edi + 0xc]
lea edx, [ecx - 1]
lea eax, [ebx - 4]
mov dword [esp + 0x30], edx
and eax, edx
cmp byte [eax + ebp], 0xff
jne 0x40762a
lea eax, [ebx - 3]
and eax, edx
cmp byte [eax + ebp], 0xdb
jne 0x40762a
lea eax, [ebx - 2]
and eax, edx
movzx ecx, byte [eax + ebp]
lea eax, [ebx - 1]
shl ecx, 8
and eax, edx
dec ecx
add ecx, ebx
movzx eax, byte [eax + ebp]
add eax, ecx
mov dword [esi + 0x538], 0
mov dword [esi + 0x53c], eax
mov ecx, dword [edi]
mov edx, edi
mov edi, dword [edx + 0x10]
dec ecx
mov edx, dword [edx + 0xc]
lea eax, [edi - 2]
and eax, ecx
cmp byte [eax + edx], 0xff
jne 0x406e05
lea eax, [edi - 1]
and eax, ecx
mov al, byte [eax + edx]
and al, 0xf8
cmp al, 0xd0
jne 0x406e05
mov eax, dword [esi + 0x45c]
shl eax, 2
push eax
mov dword [esi + 0x3d0], 0
mov dword [esi + 0x3c8], 0
mov dword [esi + 0x3c4], 0
mov dword [esi + 0x3c0], 0
mov dword [esi + 0x3cc], 0xffffffff
push 0
push dword [esi + 0x468]
call fcn.00401670
add esp, 0xc
mov ebx, dword [esi + 0x10]
mov edi, ebx
mov eax, dword [ebx + 0x10]
cmp eax, dword [esi + 0x3a8]
jne 0x4073c8
mov eax, dword [esi + 0xc]
cmp dword [eax], 1
jne 0x4073c8
cmp dword [esi + 0x3bc], 0
jle 0x4093e1
xor ecx, ecx
mov dword [esp + 0x20], ecx
jmp 0x406e40
mov eax, dword [esi + 0x3b8]
mov edx, dword [ebx]
mov edi, dword [ebx + 0xc]
dec edx
mov ebp, dword [eax + ecx*4]
add ebp, 4
mov dword [esp + 0x24], ebp
lea eax, [ebp - 2]
and eax, edx
movzx ecx, byte [eax + edi]
lea eax, [ebp - 1]
and eax, edx
shl ecx, 8
movzx eax, byte [eax + edi]
lea edx, [ecx + ebp]
add eax, 0xfffffffe
xor ecx, ecx
add edx, eax
mov dword [esp + 0x1c], edx
cmp ebp, edx
jge 0x406ff9
cmp edx, dword [ebx + 0x10]
jge 0x406ff7
lea eax, [ebp + 0x834]
cmp edx, eax
jge 0x406ff7
inc ecx
mov dword [esp + 0x18], ecx
cmp ecx, 0xa
jge 0x406ff7
mov ecx, dword [ebx]
mov eax, dword [ebx + 0xc]
dec ecx
and ecx, ebp
movzx eax, byte [ecx + eax]
mov ecx, eax
and eax, 0xf
shr ecx, 4
cmp ecx, 2
jae 0x406ff7
cmp eax, 4
jae 0x406ff7
lea ebx, [eax + ecx*4]
lea eax, [ebx + ebx*2]
shl ebx, 8
shl eax, 6
add eax, dword [esi + 0x3e0]
mov dword [esp + 0x2c], eax
lea eax, [ebp + 0x11]
mov dword [esp + 0x28], eax
xor ebp, ebp
inc eax
mov dword [esp + 0x30], eax
mov ecx, dword [esi + 0x10]
lea edi, [eax + ebp]
lea edx, [edi - 1]
mov eax, dword [ecx]
dec eax
and edx, eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [esi + 0x448]
add ecx, ebp
movzx eax, byte [edx + eax]
mov byte [ecx + ebx], al
mov eax, dword [esi + 0x10]
mov ecx, dword [esi + 0x448]
add ecx, ebp
mov edx, dword [eax]
mov eax, dword [eax + 0xc]
dec edx
and edx, edi
movzx eax, byte [edx + eax]
lea edx, [edi + 1]
mov byte [ecx + ebx + 1], al
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
dec eax
and edx, eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [esi + 0x448]
add ecx, ebp
movzx eax, byte [edx + eax]
lea edx, [edi + 2]
mov byte [ecx + ebx + 2], al
mov ecx, dword [esi + 0x10]
mov eax, dword [ecx]
dec eax
and edx, eax
mov eax, dword [ecx + 0xc]
mov ecx, dword [esi + 0x448]
add ecx, ebp
add ebp, 4
movzx eax, byte [edx + eax]
mov byte [ecx + ebx + 3], al
mov eax, dword [esp + 0x30]
cmp ebp, 0x100
jl 0x406ef0
mov ebp, dword [esp + 0x24]
xor edx, edx
mov edi, dword [esp + 0x2c]
inc ebp
add edi, 8
mov dword [esp + 0x24], 0x10
mov dword [edi - 8], edx
lea edi, [edi + 0xc]
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
dec ecx
and ecx, ebp
movzx eax, byte [ecx + eax]
add edx, eax
mov dword [edi - 0xc], ebx
mov dword [edi - 0x10], edx
add edx, edx
mov eax, dword [esi + 0x10]
mov ecx, dword [eax]
mov eax, dword [eax + 0xc]
dec ecx
and ecx, ebp
inc ebp
movzx eax, byte [ecx + eax]
mov ecx, dword [esp + 0x28]
add ebx, eax
add ecx, eax
sub dword [esp + 0x24], 1
mov dword [esp + 0x28], ecx
jne 0x406f90
mov ebp, ecx
mov dword [esp + 0x24], ebp
cmp ebx, 0x7ff
ja 0x4093e1
mov edx, dword [esp + 0x1c]
cmp ecx, edx
mov ebx, dword [esi + 0x10]
mov ecx, dword [esp + 0x18]
jl 0x406e81
cmp ebp, edx
jne 0x4093e1
mov ecx, dword [esp + 0x20]
inc ecx
mov dword [esp + 0x20], ecx
cmp ecx, dword [esi + 0x3bc]
jl 0x406e40
mov edi, dword [esi + 0x3a0]
mov dword [esi + 0x3c8], 0
mov dword [esi + 0x3c4], 0
mov dword [esi + 0x3c0], 0
mov dword [esi + 0x3cc], 0xffffffff
test edi, edi
jne 0x407052
cmp dword [esi + 0x3a4], edi
jne 0x4093eb
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x3a4]
add eax, 4
mov edx, dword [ecx]
mov ecx, dword [ecx + 0xc]
dec edx
and eax, edx
movzx ebp, byte [eax + ecx]
lea eax, [edi + 9]
and eax, edx
mov dword [esp + 0x20], ebp
movzx eax, byte [eax + ecx]
mov dword [esp + 0x24], eax
cmp ebp, 4
ja 0x4093e1
cmp eax, 4
ja 0x4093e1
xor ebx, ebx
mov dword [esi + 0x3e4], 0
mov dword [esp + 0x1c], 0
mov dword [esp + 0x14], ebx
test ebp, ebp
je 0x4093e1
mov ecx, dword [esp + 0x20]
lea ebp, [ebx + 6]
jmp 0x4070c0
mov dword [esp + 0x28], 0
test eax, eax
je 0x407243
xor edx, edx
mov dword [esp + 0x18], edx
mov ecx, dword [esi + 0x10]
mov eax, dword [esi + 0x3a4]
dec eax
add eax, ebp
mov ebx, dword [ecx + 0xc]
mov edi, dword [ecx]
mov ecx, dword [esi + 0x3a0]
dec edi
add ecx, edx
and eax, edi
mov dword [esp + 0x30], ecx
add ecx, 0xa
and ecx, edi
mov al, byte [eax + ebx]
cmp al, byte [ecx + ebx]
jne 0x40721d
mov eax, dword [esp + 0x30]
add eax, 0xb
and eax, edi
movzx edi, byte [eax + ebx]
mov eax, edi
shr eax, 4
cmp eax, dword [esp + 0x1c]
jle 0x407123
mov dword [esp + 0x1c], eax
and edi, 0xf
imul edi, eax
cmp edi, 1
jb 0x4093e1
mov ebx, dword [esi + 0x3e4]
lea eax, [ebx + edi]
cmp eax, 0xa
jg 0x4093e1
test edi, edi
je 0x40721d
lea esp, [esp]
cmp ebx, 0xa
jge 0x4093e1
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x3a4]
add edx, ebp
mov eax, dword [ecx]
dec eax
and edx, eax
mov eax, dword [ecx + 0xc]
movzx eax, byte [edx + eax]
shr eax, 4
mov dword [esi + ebx*4 + 0x3ec], eax
mov ecx, dword [esi + 0x10]
mov edx, dword [esi + 0x3a4]
add edx, ebp
mov eax, dword [ecx]
dec eax
and edx, eax
mov eax, dword [ecx + 0xc]
movzx ecx, byte [edx + eax]
mov eax, dword [esi + 0x3e4]
and ecx, 0xf
mov dword [esi + eax*4 + 0x414], ecx
mov ecx, dword [esi + 0x3e4]
cmp dword [esi + ecx*4 + 0x3ec], 4
jge 0x4093e1
cmp dword [esi + ecx*4 + 0x414], 4
jge 0x4093e1
mov eax, dword [esi + 0x458]
mov edx, dword [esp + 0x14]
mov dword [eax + ecx*4], edx
mov edx, dword [esi + 0x10]
mov ecx, dword [esp + 0x18]
add ecx, 0xc
add ecx, dword [esi + 0x3a0]
mov eax, dword [edx]
dec eax
and ecx, eax
mov eax, dword [edx + 0xc]
movzx edx, byte [ecx + eax]
cmp edx, 4
jae 0x4093e1
mov ecx, dword [esi + 0x3e4]
mov eax, dword [esi + 0x560]
mov dword [eax + ecx*4], edx
inc dword [esi + 0x3e4]
mov ebx, dword [esi + 0x3e4]
sub edi, 1
jne 0x407150
mov edx, dword [esp + 0x18]
mov eax, dword [esp + 0x28]
add edx, 3
inc eax
mov dword [esp + 0x18], edx
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jl 0x4070d6
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
inc ebx
add ebp, 2
mov dword [esp + 0x14], ebx
cmp ebx, ecx
jl 0x4070c0
mov ebp, dword [esp + 0x1c]
lea eax, [ebp - 1]
cmp eax, 9
ja 0x4093e1
xor edx, edx
mov dword [esp + 0x28], edx
cmp dword [esi + 0x3e4], edx
jle 0x4072e0
mov eax, dword [esi + 0x514]
mov ebx, 1
mov dword [eax + edx*4], 0
mov edi, dword [esi + 0x3e4]
cmp edi, ebx
jle 0x4072c0
mov ebp, edi
nop
lea eax, [ebx + edx]
mov ecx, dword [esi + 0x458]
cdq
mov edi, ebp
idiv ebp
mov eax, dword [ecx + edx*4]
mov edx, dword [esp + 0x28]
cmp eax, dword [ecx + edx*4]
jne 0x4072b9
mov eax, dword [esi + 0x514]
mov dword [eax + edx*4], ebx
mov edi, dword [esi + 0x3e4]
inc ebx
mov ebp, edi
cmp ebx, edi
jl 0x407290
mov eax, dword [esi + 0x514]
sub edi, dword [eax + edx*4]
shl edi, 6
mov dword [eax + edx*4], edi
inc edx
mov dword [esp + 0x28], edx
cmp edx, dword [esi + 0x3e4]
jl 0x407271
mov ebp, dword [esp + 0x1c]
xor edi, edi
movzx eax, byte [edi + 0x4166a8]
lea edx, [edi + 1]
movzx ecx, byte [edi + 0x4166e8]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov dword [eax + ecx*4], edi
movzx eax, byte [edi + 0x4166a9]
movzx ecx, byte [edi + 0x4166e9]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov dword [eax + ecx*4], edx
lea edx, [edi + 2]
movzx eax, byte [edi + 0x4166aa]
movzx ecx, byte [edi + 0x4166ea]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov dword [eax + ecx*4], edx
lea edx, [edi + 3]
movzx eax, byte [edi + 0x4166ab]
movzx ecx, byte [edi + 0x4166eb]
add edi, 4
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov dword [eax + ecx*4], edx
cmp edi, 0x40
jl 0x4072e2
mov edi, dword [esi + 0x10]
mov ebx, dword [esi + 0x3a0]
mov dword [esp + 0x30], edi
mov edx, dword [edi]
mov edi, dword [edi + 0xc]
lea eax, [ebx + 7]
dec edx
and eax, edx
movzx ecx, byte [eax + edi]
lea eax, [ebx + 8]
and eax, edx
shl ecx, 8
movzx eax, byte [eax + edi]
dec eax
add eax, ecx
lea ecx, [ebp*8]
cdq
idiv ecx
lea ecx, [eax + 1]
mov dword [esi + 0x470], ecx
test eax, eax
js 0x4093e1
mov eax, dword [esi + 0x3e4]
mov edi, dword [esp + 0x30]
shl eax, 6
mov dword [esi + 0x3e4], eax
mov dword [esi + 0x478], 0
mov dword [esi + 0x474], 0
cmp dword [esi + 0x3e4], 0
je 0x408547
mov eax, dword [esi + 0xc]
xor ecx, ecx
mov edx, dword [edi + 0x10]
cmp dword [eax], ecx
mov eax, dword [edi]
sete cl
dec eax
sub edx, ecx
dec edx
and edx, eax
mov eax, dword [edi + 0xc]
cmp byte [edx + eax], 0xff
je 0x408547
mov edx, dword [esi + 0x3c4]
cmp edx, 0x20
jg 0x4093e1
cmp dword [esi + 0x3cc], 0
lea ebp, [edx + 1]
mov eax, dword [esi]
mov ecx, dword [esi + 0x3c0]
mov eax, dword [eax]
mov dword [esi + 0x3c4], ebp
lea edi, [eax + ecx*2]
mov dword [esi + 0x3c0], edi
jge 0x407503
cmp ebp, 1
jl 0x4093e1
cmp edx, 0x10
jge 0x4093e1
mov ecx, dword [esi + 0x3d0]
mov edx, ecx
and edx, 0x3f
test ecx, ecx
js 0x4093e1
sar ecx, 6
cmp ecx, 0xa
jge 0x4093e1
xor eax, eax
cmp eax, edx
sbb eax, eax
add ecx, 0xfb
and eax, 0xa
add eax, ecx
mov ecx, dword [esi + eax*4]
cmp ecx, 3
ja 0x4093e1
lea edi, [ebp - 1]
cmp edi, 0xf
ja 0x4093e1
xor eax, eax
cmp eax, edx
sbb eax, eax
and eax, 4
add eax, ecx
lea ecx, [eax + eax*2]
shl ecx, 6
lea eax, [edi + edi*2]
add ecx, dword [esi + 0x3e0]
mov edx, dword [ecx + eax*4 + 4]
lea eax, [ecx + eax*4]
mov ecx, dword [eax]
cmp ecx, edx
ja 0x4093e1
mov eax, dword [eax + 8]
cmp eax, 0x800
jge 0x4093e1
test ebp, ebp
jle 0x4093e1
mov edi, dword [esi + 0x3c0]
cmp edi, edx
jae 0x407503
cmp edi, ecx
jb 0x4093e1
sub eax, ecx
lea ecx, [eax + edi]
cmp ecx, 0x7ff
ja 0x4093e1
mov eax, dword [esi + 0x448]
movzx eax, byte [eax + ecx]
mov dword [esi + 0x3cc], eax
mov dword [esi + 0x3c8], ebp
mov ebx, dword [esi + 0x3cc]
test ebx, ebx
js 0x408547
mov eax, dword [esi + 0x3c8]
mov edx, ebx
and edx, 0xf
add eax, edx
mov dword [esp + 0x28], edx
cmp eax, ebp
jne 0x408547
mov eax, dword [esi + 0x49c]
push 0xffffffffffffffff
push 0xffffffffffffffff
push 0xffffffffffffffff
mov dword [esi + 0x4a0], eax
mov eax, dword [esi + 0x498]
push ebp
mov dword [esi + 0x49c], eax
mov eax, dword [esi + 0x494]
push edi
mov dword [esi + 0x498], eax
call fcn.004067a0
mov dword [esi + 0x494], eax
mov eax, dword [esi + 0x4ac]
mov dword [esi + 0x4b0], eax
mov eax, dword [esi + 0x4a8]
mov dword [esi + 0x4ac], eax
mov eax, dword [esi + 0x4a4]
mov dword [esi + 0x4a8], eax
mov eax, dword [esi + 0x3d0]
mov dword [esi + 0x4a4], ebx
test al, 0x3f
je 0x4077e2
test ebx, ebx
jne 0x4076c3
add eax, 0x3f
and eax, 0xffffffc0
mov dword [esi + 0x3d0], eax
jl 0x4093e1
cmp eax, dword [esi + 0x3e4]
jg 0x4093e1
cmp eax, 0x280
jg 0x4093e1
test byte [esi + 0x490], 0x3f
je 0x4078e4
jmp 0x4075e0
mov ecx, dword [esi + 0x4c8]
mov eax, dword [esi + 0x4d4]
dec ecx
and ecx, dword [esi + 0x490]
mov dword [eax + ecx*4], 0
mov edx, dword [esi + 0x490]
lea eax, [edx + 1]
mov dword [esi + 0x490], eax
mov ecx, dword [esi + 0x47c]
mov eax, dword [esi + 0x488]
dec ecx
and ecx, edx
mov byte [ecx + eax], 0
test byte [esi + 0x490], 0x3f
jne 0x4075e0
jmp 0x4078e4
mov eax, dword [esi + 0x538]
mov edx, edi
test eax, eax
js 0x406d99
cmp ebx, dword [esi + 0x53c]
jl 0x407651
mov dword [esi + 0x538], 0xffffffff
jmp 0x406d95
cdq
mov ecx, 0x41
idiv ecx
lea eax, [ebx - 1]
and eax, dword [esp + 0x30]
mov cl, byte [eax + ebp]
test edx, edx
jne 0x407686
movzx eax, cl
mov edx, edi
mov dword [esi + 0x540], eax
mov eax, dword [esi + 0x538]
inc eax
mov dword [esi + 0x538], eax
mov ecx, dword [edx]
jmp 0x406d99
test cl, cl
je 0x4093e1
mov eax, dword [esi + 0x540]
cmp eax, 3
ja 0x4093e1
shl eax, 6
dec cl
add eax, dword [esi + 0x550]
mov byte [eax + edx - 1], cl
mov eax, dword [esi + 0x538]
mov edx, dword [esi + 0x10]
inc eax
mov dword [esi + 0x538], eax
mov ecx, dword [edx]
jmp 0x406d99
cmp edx, 0xa
ja 0x4093e1
sar ebx, 4
lea ecx, [eax + ebx]
xor eax, ecx
test eax, 0xffffffc0
jne 0x4093e1
lea eax, [ecx + 1]
mov byte [esp + 0x13], dl
mov dword [esi + 0x3d0], eax
mov ecx, edx
mov eax, 1
shl eax, cl
mov dword [esp + 0x30], eax
lea ebp, [eax - 1]
and ebp, edi
test edx, edx
je 0x407720
lea ecx, [edx - 1]
mov byte [esp + 0x13], dl
mov eax, ebp
sar eax, cl
test eax, eax
jne 0x407720
mov eax, 1
mov byte [esp + 0x13], dl
sub eax, dword [esp + 0x30]
add ebp, eax
cmp ebx, 1
jl 0x40777c
jmp 0x407730
mov ecx, dword [esi + 0x4c8]
mov dl, bl
mov eax, dword [esi + 0x4d4]
dec ecx
and ecx, dword [esi + 0x490]
dec ebx
shl dl, 4
or dl, byte [esp + 0x28]
mov dword [eax + ecx*4], 0
mov edi, dword [esi + 0x490]
lea eax, [edi + 1]
mov dword [esi + 0x490], eax
mov ecx, dword [esi + 0x47c]
mov eax, dword [esi + 0x488]
dec ecx
and ecx, edi
mov byte [ecx + eax], dl
cmp ebx, 1
jge 0x407730
jmp 0x407780
mov byte [esp + 0x13], dl
mov ecx, dword [esi + 0x4c8]
mov eax, dword [esi + 0x4d4]
dec ecx
and ecx, dword [esi + 0x490]
mov ebx, dword [esp + 0x28]
mov dword [eax + ecx*4], ebp
mov ecx, ebx
mov edi, dword [esi + 0x490]
mov edx, dword [esi + 0x3c0]
shl edx, 2
shr edx, cl
lea eax, [edi + 1]
and dl, 3
mov dword [esi + 0x490], eax
mov al, byte [esp + 0x13]
mov ecx, dword [esi + 0x47c]
shl al, 4
dec ecx
or dl, al
and ecx, edi
mov eax, dword [esi + 0x488]
or dl, 0xc
mov byte [ecx + eax], dl
add dword [esi + 0x4b4], ebx
jmp 0x4078e4
cmp ebx, 0xc
jge 0x4093e1
lea edx, [eax + 1]
mov ecx, ebx
mov eax, 1
mov dword [esi + 0x3d0], edx
shl eax, cl
mov dword [esp + 0x30], eax
lea ebp, [eax - 1]
and ebp, edi
test ebx, ebx
je 0x407820
lea ecx, [ebx - 1]
mov eax, ebp
sar eax, cl
test eax, eax
jne 0x407820
mov eax, 1
sub eax, dword [esp + 0x30]
add ebp, eax
test edx, edx
js 0x4093e1
sar edx, 6
cmp edx, 0xa
jge 0x4093e1
mov eax, dword [esi + 0x458]
mov ecx, dword [eax + edx*4]
cmp ecx, 3
ja 0x4093e1
mov eax, dword [esi + 0x468]
add dword [eax + ecx*4], ebp
mov edx, dword [eax + ecx*4]
mov eax, dword [esi + 0x490]
mov dword [esi + 0x46c], edx
test al, 0x3f
jne 0x4093e1
mov ecx, dword [esi + 0x4c8]
dec ecx
and ecx, eax
mov eax, dword [esi + 0x4d4]
mov dword [eax + ecx*4], edx
mov edi, dword [esi + 0x490]
mov edx, dword [esi + 0x46c]
add edx, 0x3ff
sar edx, 3
lea eax, [edi + 1]
mov dword [esi + 0x490], eax
mov ecx, dword [esi + 0x47c]
mov eax, dword [esi + 0x488]
dec ecx
and ecx, edi
mov byte [ecx + eax], dl
mov eax, dword [esi + 0x4c0]
mov dword [esi + 0x4c4], eax
mov eax, dword [esi + 0x4bc]
mov dword [esi + 0x4c0], eax
mov eax, dword [esi + 0x4b8]
mov dword [esi + 0x4bc], eax
mov eax, dword [esi + 0x4b4]
mov dword [esi + 0x4b8], eax
mov eax, dword [esi + 0x3cc]
mov dword [esi + 0x4b4], eax
mov ebp, dword [esi + 0x3d0]
test ebp, ebp
js 0x4093e1
cmp ebp, dword [esi + 0x3e4]
jg 0x4093e1
jl 0x40792c
inc dword [esi + 0x478]
xor ebp, ebp
mov eax, dword [esi + 0x478]
mov dword [esi + 0x3d0], 0
cmp eax, dword [esi + 0x470]
jne 0x40792c
inc dword [esi + 0x474]
mov dword [esi + 0x478], ebp
mov edi, dword [esi + 0x490]
mov eax, ebp
sar eax, 6
and ebp, 0x3f
mov dword [esi + 0x3c4], 0
mov ebx, edi
mov dword [esi + 0x3c8], 0
sub ebx, ebp
mov dword [esi + 0x3c0], 0
lea ecx, [eax*4]
mov dword [esi + 0x3cc], 0xffffffff
mov eax, dword [esi + 0x560]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x28], ebp
mov dword [esp + 0x1c], ebx
mov edx, dword [ecx + eax]
shl edx, 6
mov dword [esp + 0x14], edx
test ebp, ebp
jne 0x407bd9
lea edi, [esi + 0x5e4]
mov ebp, 8
lea esp, [esp]
lea eax, [edi + 0x40]
mov ecx, esi
push eax
push edi
push dword [edi - 0x20]
push dword [edi - 0x60]
call fcn.0040d790
lea eax, [edi + 0x60]
mov ecx, esi
push eax
lea eax, [edi + 0x20]
push eax
push dword [edi - 0x40]
push dword [edi - 0x80]
call fcn.0040d790
mov dword [edi - 0x20], 0
mov dword [edi - 0x40], 0
mov dword [edi - 0x60], 0
mov dword [edi - 0x80], 0
add edi, 4
sub ebp, 1
jne 0x4079a0
mov eax, dword [esi + 0x514]
mov edx, ebx
mov ecx, dword [esp + 0x20]
mov edi, ebx
xor ebx, ebx
mov dword [esp + 0x18], ebx
sub edx, dword [eax + ecx]
mov eax, dword [esi + 0x470]
imul eax, dword [esi + 0x3e4]
sub edi, eax
sub edi, 0x4166a8
sub edx, 0x4166a8
mov dword [esp + 0x3c], edi
mov dword [esp + 0x30], edx
jmp 0x407a30
mov edx, dword [esi + 0x4c8]
lea eax, [ebx + 0x4166a8]
add edi, eax
mov bl, byte [ebx + 0x4166e8]
mov dword [esp + 0x34], eax
lea ecx, [esi + 0x4d4]
movzx eax, byte [eax]
dec edx
mov ecx, dword [ecx]
and edx, edi
mov dword [esp + 0x24], edi
lea ebp, [esi + eax*4]
mov al, bl
not al
and eax, 1
lea edi, [eax*2 - 1]
mov eax, dword [esi + 0x550]
imul edi, dword [ecx + edx*4]
mov ecx, dword [esp + 0x18]
add eax, ecx
mov edx, dword [esp + 0x14]
movzx eax, byte [eax + edx]
inc eax
imul edi, eax
movzx eax, bl
imul edi, dword [eax*4 + 0x416728]
lea eax, [ecx + 0x4166a8]
add dword [ebp + 0x564], edi
mov bl, byte [eax]
mov edi, dword [esp + 0x30]
mov edx, dword [esi + 0x4c8]
add edi, eax
movzx eax, byte [ecx + 0x4166e8]
dec edx
mov ecx, dword [esi + 0x4d4]
and edx, edi
mov dword [esp + 0x38], edi
lea ebp, [esi + eax*4]
mov al, bl
not al
and eax, 1
lea edi, [eax*2 - 1]
mov eax, dword [esi + 0x550]
imul edi, dword [ecx + edx*4]
add eax, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
movzx eax, byte [eax + ecx]
inc eax
imul edi, eax
movzx eax, bl
mov ebx, dword [esp + 0x18]
imul edi, dword [eax*4 + 0x416728]
add dword [ebp + 0x584], edi
mov al, byte [ebx + 0x4166e8]
test al, al
je 0x407b1f
not al
and eax, 1
shl eax, 9
sub eax, 0x100
mov dword [esp + 0x2c], eax
mov ebp, eax
jmp 0x407b24
mov ebp, 0xb5
movzx eax, byte [ebx + 0x4166a8]
mov edx, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec edx
and edx, dword [esp + 0x24]
lea edi, [esi + eax*4]
mov eax, dword [esi + 0x550]
add eax, ebx
mov ebx, dword [esp + 0x14]
movzx eax, byte [eax + ebx]
inc eax
imul eax, dword [ecx + edx*4]
imul eax, ebp
add dword [edi + 0x5a4], eax
mov eax, dword [esp + 0x34]
mov al, byte [eax]
test al, al
je 0x407b7c
not al
and eax, 1
shl eax, 9
sub eax, 0x100
mov dword [esp + 0x34], eax
mov ebp, eax
jmp 0x407b81
mov ebp, 0xb5
mov ebx, dword [esp + 0x18]
mov edx, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec edx
and edx, dword [esp + 0x38]
movzx eax, byte [ebx + 0x4166e8]
lea edi, [esi + eax*4]
mov eax, dword [esi + 0x550]
add eax, ebx
mov ebx, dword [esp + 0x14]
movzx eax, byte [eax + ebx]
mov ebx, dword [esp + 0x18]
inc eax
imul eax, dword [ecx + edx*4]
inc ebx
mov dword [esp + 0x18], ebx
imul eax, ebp
add dword [edi + 0x5c4], eax
mov edi, dword [esp + 0x3c]
cmp ebx, 0x40
jl 0x407a30
jmp 0x407d09
movzx eax, byte [ebp + 0x4166a7]
dec edi
mov ecx, dword [esi + 0x4d4]
lea ebx, [esi + eax*4]
mov eax, dword [esi + 0x4c8]
dec eax
and edi, eax
mov eax, dword [esi + 0x550]
add eax, ebp
movzx edx, byte [eax + edx - 1]
movzx eax, byte [ebp + 0x4166e7]
inc edx
imul edx, dword [ecx + edi*4]
imul edx, dword [eax*4 + 0x416728]
sub dword [ebx + 0x564], edx
movzx eax, byte [ebp + 0x4166e7]
mov edi, dword [esi + 0x490]
mov ecx, dword [esi + 0x4d4]
dec edi
mov edx, dword [esp + 0x14]
lea ebx, [esi + eax*4]
mov eax, dword [esi + 0x4c8]
dec eax
and edi, eax
mov eax, dword [esi + 0x550]
add eax, ebp
movzx edx, byte [eax + edx - 1]
movzx eax, byte [ebp + 0x4166a7]
inc edx
imul edx, dword [ecx + edi*4]
imul edx, dword [eax*4 + 0x416728]
sub dword [ebx + 0x584], edx
movzx eax, byte [ebp + 0x4166a7]
mov edi, dword [esi + 0x490]
mov edx, dword [esp + 0x14]
dec edi
mov ecx, dword [esi + 0x4d4]
lea ebx, [esi + eax*4]
mov eax, dword [esi + 0x4c8]
dec eax
and edi, eax
mov eax, dword [esi + 0x550]
add eax, ebp
movzx edx, byte [eax + edx - 1]
movzx eax, byte [ebp + 0x4166e7]
inc edx
imul edx, dword [ecx + edi*4]
neg eax
sbb eax, eax
and eax, 0x4b
add eax, 0xb5
imul edx, eax
sub dword [ebx + 0x5a4], edx
movzx eax, byte [ebp + 0x4166e7]
mov edi, dword [esi + 0x490]
mov edx, dword [esp + 0x14]
dec edi
mov ecx, dword [esi + 0x4d4]
lea ebx, [esi + eax*4]
mov eax, dword [esi + 0x4c8]
dec eax
and edi, eax
mov eax, dword [esi + 0x550]
add eax, ebp
movzx edx, byte [eax + edx - 1]
movzx eax, byte [ebp + 0x4166a7]
inc edx
imul edx, dword [ecx + edi*4]
neg eax
sbb eax, eax
and eax, 0x4b
add eax, 0xb5
imul edx, eax
sub dword [ebx + 0x5c4], edx
mov edx, dword [esi + 0x5e4]
mov edi, 8
mov ecx, dword [esi + 0x584]
mov eax, edi
sub eax, edx
imul ecx, edx
imul eax, dword [esi + 0x5c4]
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx], eax
mov eax, edi
mov edx, dword [esi + 0x604]
sub eax, edx
imul eax, dword [esi + 0x5a4]
mov ecx, dword [esi + 0x564]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx], eax
mov eax, edi
mov edx, dword [esi + 0x5e8]
sub eax, edx
imul eax, dword [esi + 0x5c8]
mov ecx, dword [esi + 0x588]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 4], eax
mov eax, edi
mov edx, dword [esi + 0x608]
sub eax, edx
imul eax, dword [esi + 0x5a8]
mov ecx, dword [esi + 0x568]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 4], eax
mov eax, edi
mov edx, dword [esi + 0x5ec]
sub eax, edx
imul eax, dword [esi + 0x5cc]
mov ecx, dword [esi + 0x58c]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 8], eax
mov eax, edi
mov edx, dword [esi + 0x60c]
sub eax, edx
imul eax, dword [esi + 0x5ac]
mov ecx, dword [esi + 0x56c]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 8], eax
mov eax, edi
mov edx, dword [esi + 0x5f0]
sub eax, edx
mov ecx, dword [esi + 0x590]
imul eax, dword [esi + 0x5d0]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0xc], eax
mov eax, edi
mov edx, dword [esi + 0x610]
sub eax, edx
imul eax, dword [esi + 0x5b0]
mov ecx, dword [esi + 0x570]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0xc], eax
mov eax, edi
mov edx, dword [esi + 0x5f4]
sub eax, edx
imul eax, dword [esi + 0x5d4]
mov ecx, dword [esi + 0x594]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x10], eax
mov eax, edi
mov edx, dword [esi + 0x614]
sub eax, edx
imul eax, dword [esi + 0x5b4]
mov ecx, dword [esi + 0x574]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x10], eax
mov eax, edi
mov edx, dword [esi + 0x5f8]
sub eax, edx
imul eax, dword [esi + 0x5d8]
mov ecx, dword [esi + 0x598]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x14], eax
mov eax, edi
mov edx, dword [esi + 0x618]
sub eax, edx
imul eax, dword [esi + 0x5b8]
mov ecx, dword [esi + 0x578]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x14], eax
mov eax, edi
mov edx, dword [esi + 0x5fc]
sub eax, edx
imul eax, dword [esi + 0x5dc]
mov ecx, dword [esi + 0x59c]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x18], eax
mov eax, edi
mov edx, dword [esi + 0x61c]
sub eax, edx
imul eax, dword [esi + 0x5bc]
mov ecx, dword [esi + 0x57c]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x4f4]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x18], eax
mov eax, edi
mov edx, dword [esi + 0x600]
sub eax, edx
imul eax, dword [esi + 0x5e0]
mov ecx, dword [esi + 0x5a0]
imul ecx, edx
add eax, ecx
mov ecx, dword [esi + 0x504]
cdq
and edx, 7
add eax, edx
sar eax, 3
mov dword [ecx + 0x1c], eax
mov edx, dword [esi + 0x620]
sub edi, edx
mov eax, dword [esi + 0x580]
imul edi, dword [esi + 0x5c0]
mov ecx, dword [esi + 0x4f4]
imul eax, edx
add eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
xor ebx, ebx
mov dword [ecx + 0x1c], eax
mov dword [esp + 0x18], ebx
mov edx, 2
xor ebp, ebp
sub edx, ebx
mov dword [esp + 0x3c], edx
lea ecx, [ecx]
mov ebx, dword [esp + 0x28]
add ebx, ebp
cmp ebx, 0x3f
jl 0x408010
mov ebx, 0x3f
movzx ecx, byte [ebx + 0x4166e8]
mov eax, dword [esi + 0x504]
mov eax, dword [eax + ecx*4]
mov ecx, dword [esi + 0x4f4]
imul eax, edx
movzx edx, byte [ebx + 0x4166a8]
mov ecx, dword [ecx + edx*4]
imul ecx, dword [esp + 0x18]
add eax, ecx
mov ecx, dword [esi + 0x550]
cdq
add ecx, ebx
sub eax, edx
mov edx, dword [esp + 0x14]
sar eax, 1
movzx ecx, byte [ecx + edx]
inc ecx
cdq
imul ecx, ecx, 0xb5
idiv ecx
mov edi, eax
test ebx, ebx
jne 0x408096
mov eax, dword [esi + 0x514]
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x1c]
sub ecx, dword [eax + edx]
mov eax, dword [esi + 0x4c8]
dec eax
and ecx, eax
mov eax, dword [esi + 0x4d4]
sub edi, dword [eax + ecx*4]
mov eax, edi
cdq
mov ecx, eax
xor ecx, edx
sub ecx, edx
lea eax, [ecx*8]
sub eax, ecx
jmp 0x4080a0
mov eax, edi
cdq
xor eax, edx
sub eax, edx
lea eax, [eax + eax*4]
lea eax, [eax*2 + 1]
sar edi, 0x1f
mov ebx, dword [esp + 0x18]
and edi, 0xfffffffe
movzx eax, ax
inc edi
movzx ecx, byte [eax + 0x4352c0]
mov eax, 0x66666667
imul ecx, edi
imul ecx
mov eax, dword [esi + 0x4e4]
sar edx, 2
mov edi, edx
shr edi, 0x1f
add edi, edx
test ebp, ebp
jne 0x4080f4
mov dword [eax + ebx*4], edi
mov eax, edi
mov ecx, dword [esi + 0x4e4]
cdq
and edx, 3
add eax, edx
sar eax, 2
mov dword [ecx + ebx*4 + 0x10], eax
jmp 0x40810e
mov eax, dword [eax + ebx*4]
mov dword [esp + 0x38], eax
cdq
mov ecx, eax
mov eax, edi
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
inc ecx
sub eax, edx
cmp eax, ecx
jg 0x40811e
mov edx, dword [esp + 0x3c]
inc ebp
cmp ebp, 8
jl 0x408000
jmp 0x40817e
mov ecx, dword [esi + 0x4e4]
xor eax, eax
test edi, edi
setle al
shl ebp, 7
dec eax
and eax, 0x40
add ebp, eax
mov eax, dword [esp + 0x38]
add eax, ebp
mov dword [ecx + ebx*4], eax
mov eax, dword [esi + 0x4e4]
lea eax, [eax + ebx*4]
add eax, 0x10
mov dword [esp + 0x38], eax
mov eax, dword [eax]
mov dword [esp + 0x3c], eax
mov eax, edi
mov edi, dword [esp + 0x3c]
cdq
and edx, 3
add eax, edx
sar eax, 2
cdq
mov ecx, eax
mov eax, edi
xor ecx, edx
sub ecx, edx
cdq
xor eax, edx
sub eax, edx
inc eax
cmp ecx, eax
jle 0x40817e
mov ecx, dword [esp + 0x38]
lea eax, [edi + ebp]
mov dword [ecx], eax
inc ebx
mov dword [esp + 0x18], ebx
cmp ebx, 3
jl 0x407ff0
mov ebp, dword [esp + 0x28]
mov eax, dword [esi + 0x4f4]
mov edi, dword [esi + 0x504]
movzx ebx, byte [ebp + 0x4166a8]
movzx ecx, byte [ebp + 0x4166e8]
mov edx, dword [eax + ebx*4]
add edx, dword [edi + ecx*4]
add edx, edx
cmp ebx, 1
jae 0x4081ba
sub edx, dword [eax + 4]
cmp ecx, 1
jae 0x4081c2
sub edx, dword [edi + 4]
cmp ebx, 2
jae 0x4081ca
sub edx, dword [eax + 8]
cmp ecx, 2
jae 0x4081d2
sub edx, dword [edi + 8]
cmp ebx, 3
jae 0x4081da
sub edx, dword [eax + 0xc]
cmp ecx, 3
jae 0x4081e2
sub edx, dword [edi + 0xc]
cmp ebx, 4
jae 0x4081ea
sub edx, dword [eax + 0x10]
cmp ecx, 4
jae 0x4081f2
sub edx, dword [edi + 0x10]
cmp ebx, 5
jae 0x4081fa
sub edx, dword [eax + 0x14]
cmp ecx, 5
jae 0x408202
sub edx, dword [edi + 0x14]
cmp ebx, 6
jae 0x40820a
sub edx, dword [eax + 0x18]
cmp ecx, 6
jae 0x408212
sub edx, dword [edi + 0x18]
cmp ebx, 7
jae 0x40821a
sub edx, dword [eax + 0x1c]
cmp ecx, 7
jae 0x408222
sub edx, dword [edi + 0x1c]
mov ecx, dword [esi + 0x550]
mov eax, dword [esp + 0x14]
add ecx, ebp
mov edi, dword [esp + 0x1c]
movzx ecx, byte [ecx + eax]
mov eax, edx
inc ecx
cdq
imul ecx, ecx, 0xb5
idiv ecx
mov ebx, eax
test ebp, ebp
jne 0x408269
mov ecx, dword [esi + 0x514]
mov edx, edi
mov eax, dword [esp + 0x20]
sub edx, dword [ecx + eax]
mov ecx, dword [esi + 0x4c8]
mov eax, dword [esi + 0x4d4]
dec ecx
and edx, ecx
sub ebx, dword [eax + edx*4]
mov eax, ebx
sar ebx, 0x1f
cdq
and ebx, 0xfffffffe
xor eax, edx
inc ebx
sub eax, edx
lea ecx, [eax + eax*4]
mov eax, 0x66666667
lea ecx, [ecx*2 + 1]
movzx ecx, cx
movzx ecx, byte [ecx + 0x4352c0]
imul ecx, ebx
imul ecx
mov eax, dword [esi + 0x4e4]
sar edx, 2
mov ecx, edx
shr ecx, 0x1f
add ecx, edx
mov dword [eax + 0xc], ecx
cmp byte [ebp + 0x4166a8], 1
jae 0x4082bb
mov eax, 0xff
jmp 0x408335
movzx eax, byte [ebp + 0x4166a8]
movzx ecx, byte [ebp + 0x4166e8]
mov ebx, dword [esi + 0x550]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov edx, dword [eax + ecx*4 - 4]
add edi, edx
mov eax, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec eax
and edi, eax
mov eax, dword [esp + 0x14]
add eax, edx
movzx eax, byte [eax + ebx]
inc eax
imul eax, dword [ecx + edi*4]
mov ecx, dword [esp + 0x14]
add ecx, ebp
cdq
movzx ecx, byte [ecx + ebx]
inc ecx
idiv ecx
mov edi, eax
cdq
xor eax, edx
sar edi, 0x1f
sub eax, edx
and edi, 0xfffffffe
inc edi
lea ecx, [eax*8 + 1]
movzx ecx, cx
movzx eax, byte [ecx + 0x4352c0]
imul eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esi + 0x524]
mov dword [ecx], eax
mov al, byte [ebp + 0x4166e8]
cmp al, 1
jae 0x408351
mov eax, 0xff
jmp 0x4083cb
movzx ecx, al
movzx eax, byte [ebp + 0x4166a8]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esi + 0x550]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov edx, dword [eax + ecx*4 - 0x20]
add edi, edx
mov eax, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec eax
and edi, eax
mov eax, dword [esp + 0x14]
add eax, edx
movzx eax, byte [eax + ebx]
inc eax
imul eax, dword [ecx + edi*4]
mov ecx, dword [esp + 0x14]
add ecx, ebp
cdq
movzx ecx, byte [ecx + ebx]
inc ecx
idiv ecx
mov edi, eax
cdq
xor eax, edx
sar edi, 0x1f
sub eax, edx
and edi, 0xfffffffe
inc edi
lea ecx, [eax*8 + 1]
movzx ecx, cx
movzx eax, byte [ecx + 0x4352c0]
imul eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esi + 0x524]
mov dword [ecx + 4], eax
cmp byte [ebp + 0x4166a8], 2
jae 0x4083e7
mov eax, 0xff
jmp 0x408465
movzx eax, byte [ebp + 0x4166a8]
movzx ecx, byte [ebp + 0x4166e8]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esi + 0x550]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov edx, dword [eax + ecx*4 - 8]
add edi, edx
mov eax, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec eax
and edi, eax
mov eax, dword [esp + 0x14]
add eax, edx
movzx eax, byte [eax + ebx]
inc eax
imul eax, dword [ecx + edi*4]
mov ecx, dword [esp + 0x14]
add ecx, ebp
cdq
movzx ecx, byte [ecx + ebx]
inc ecx
idiv ecx
mov edi, eax
cdq
xor eax, edx
sar edi, 0x1f
sub eax, edx
and edi, 0xfffffffe
inc edi
lea ecx, [eax*8 + 1]
movzx ecx, cx
movzx eax, byte [ecx + 0x4352c0]
imul eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esi + 0x524]
mov dword [ecx + 8], eax
mov al, byte [ebp + 0x4166e8]
cmp al, 2
jae 0x408482
mov eax, 0xff
jmp 0x4084fc
movzx ecx, al
movzx eax, byte [ebp + 0x4166a8]
mov edi, dword [esp + 0x1c]
mov ebx, dword [esi + 0x550]
lea ecx, [eax + ecx*8]
mov eax, dword [esi + 0x534]
mov edx, dword [eax + ecx*4 - 0x40]
add edi, edx
mov eax, dword [esi + 0x4c8]
mov ecx, dword [esi + 0x4d4]
dec eax
and edi, eax
mov eax, dword [esp + 0x14]
add eax, edx
movzx eax, byte [eax + ebx]
inc eax
imul eax, dword [ecx + edi*4]
mov ecx, dword [esp + 0x14]
add ecx, ebp
cdq
movzx ecx, byte [ecx + ebx]
inc ecx
idiv ecx
mov edi, eax
cdq
xor eax, edx
sar edi, 0x1f
sub eax, edx
and edi, 0xfffffffe
inc edi
lea ecx, [eax*8 + 1]
movzx ecx, cx
movzx eax, byte [ecx + 0x4352c0]
imul eax, edi
cdq
and edx, 7
add eax, edx
sar eax, 3
mov ecx, dword [esi + 0x524]
mov dword [ecx + 0xc], eax
cmp dword [esi + 0x478], 0
jne 0x408526
mov ecx, dword [esi + 0x4e4]
mov eax, dword [ecx + 8]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x4e4]
mov dword [eax], 1
cmp dword [esi + 0x474], 0
jne 0x408547
mov ecx, dword [esi + 0x4e4]
mov eax, dword [ecx]
mov dword [ecx + 4], eax
mov eax, dword [esi + 0x4e4]
mov dword [eax + 8], 1
cmp dword [esi + 0x394], 0
je 0x4093eb
cmp dword [esi + 0x3a8], 0
je 0x4093eb
mov eax, dword [esi + 0xc]
xor ecx, ecx
mov edi, dword [esi + 0x10]
cmp dword [eax], ecx
mov edx, dword [edi + 0x10]
mov eax, dword [edi]
sete cl
sub edx, ecx
dec eax
dec edx
and edx, eax
mov eax, dword [edi + 0xc]
cmp byte [edx + eax], 0xff
jne 0x4085a5
mov edx, dword [esi + 0x14]
pop edi
pop ebp
pop ebx
mov esi, dword [edx + 0x44]
lea ecx, [esi + 1]
mov dword [edx + 0x44], ecx
mov ecx, dword [edx + 0x18]
mov edx, 0x80
mov word [ecx + esi*2], dx
lea eax, [edx - 0x7f]
pop esi
add esp, 0x3c
ret
mov eax, dword [esi + 0x48]
cmp dword [eax + 0x6c], 0
je 0x4085ce
xor edi, edi
mov eax, dword [esi + 0x48]
mov edx, dword [edi + eax]
add edi, 4
mov eax, dword [esi]
movzx ecx, byte [edx]
mov eax, dword [eax]
mov al, byte [eax + ecx*4 + 0x416220]
mov byte [edx], al
cmp edi, 0x70
jl 0x4085b0
lea ecx, [esi + 0x2ec]
call fcn.0040d360
mov edx, dword [esi + 0x3d0]
mov ecx, edx
mov eax, dword [esi + 0x458]
and edx, 0x3f
mov edi, dword [esi + 0x3c4]
sar ecx, 6
mov eax, dword [eax + ecx*4]
mov ebx, eax
shl ebx, 6
xor ecx, ecx
or ebx, edx
test eax, eax
mov eax, dword [esi + 0x3c0]
sete cl
mov dword [esp + 0x1c], ebx
lea ecx, [ecx + eax*2]
lea eax, [edi + 1]
bts ecx, eax
mov eax, dword [esi + 0x664]
inc eax
mov dword [esp + 0x18], ecx
mov dword [esi + 0x664], eax
cmp eax, 2
jg 0x408631
test edi, edi
jne 0x40863d
mov dword [esi + 0x664], 0
xor eax, eax
cmp ebx, 0xff
ja 0x4093e1
movzx ecx, byte [edx + 0x4166a8]
mov dword [esp + 0x28], ecx
movzx ecx, byte [edx + 0x4166e8]
mov dword [esp + 0x24], ecx
test eax, eax
jne 0x408f5a
mov eax, dword [esi + 0x4e4]
imul ebp, dword [esp + 0x18], 0x1c9d8f3
imul edx, ebx, 0x2fb010f
mov ecx, dword [eax + 8]
imul eax, ecx, 0x42c3047
mov dword [esp + 0x14], ebp
mov dword [esp + 0x20], edx
add eax, 0x55d4c60
add eax, ebp
add eax, edx
mov edx, eax
shr edx, 4
xor edx, ecx
xor edx, 0x7fffffe0
shr edx, 1
xor edx, ebx
shr edx, 1
xor edx, dword [esp + 0x18]
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax], edx
mov eax, dword [esi + 0x4e4]
mov edx, dword [esp + 0x20]
add edx, 0x11491a03
mov ecx, dword [eax]
imul eax, ecx, 0x42c3047
add eax, ebp
add eax, edx
mov edx, eax
shr edx, 4
xor edx, ecx
xor edx, 0x7fffffe0
shr edx, 1
xor edx, ebx
shr edx, 1
xor edx, dword [esp + 0x18]
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 4], edx
mov eax, dword [esi + 0x4e4]
mov edx, dword [esp + 0x20]
add edx, 0x1d34e7a6
mov ecx, dword [eax + 4]
imul eax, ecx, 0x42c3047
add eax, ebp
add eax, edx
mov edx, eax
shr edx, 4
xor edx, ecx
xor edx, 0x7fffffe0
shr edx, 1
xor edx, ebx
mov ebx, dword [esp + 0x18]
shr edx, 1
xor edx, ebx
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 8], edx
mov eax, dword [esi + 0x4e4]
mov edi, dword [esi + 0x4a4]
mov edx, dword [eax + 8]
imul ecx, edx, 0x42c3047
imul eax, edi, 0x2fb010f
add ecx, ebp
add eax, 0x2920b549
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edx
xor ecx, 0x7fffffc0
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0xc], ecx
mov eax, dword [esi + 0x4e4]
mov edi, dword [esi + 0x4a4]
mov edx, dword [eax]
imul ecx, edx, 0x42c3047
imul eax, edi, 0x2fb010f
add ecx, ebp
add eax, 0x350c82ec
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edx
xor ecx, 0x7fffffc0
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x10], ecx
mov eax, dword [esi + 0x4e4]
mov edi, dword [esi + 0x4a4]
mov edx, dword [eax + 4]
imul ecx, edx, 0x42c3047
imul eax, edi, 0x2fb010f
add ecx, ebp
add eax, 0x40f8508f
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edx
xor ecx, 0x7fffffc0
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x14], ecx
mov eax, dword [esi + 0x4e4]
mov edx, dword [eax]
mov edi, dword [eax + 8]
imul ecx, edx, 0x42c3047
imul eax, edi, 0x2fb010f
add ecx, ebp
add eax, 0x4ce41e32
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edx
xor ecx, 0x7fffffc0
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x18], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [esi + 0x490]
mov edi, dword [eax + 0xc]
mov eax, dword [esi + 0x470]
imul eax, dword [esi + 0x3e4]
sub ecx, eax
mov eax, dword [esi + 0x47c]
dec eax
and ecx, eax
mov eax, dword [esi + 0x488]
movzx edx, byte [ecx + eax]
imul ecx, edi, 0x42c3047
imul eax, edx, 0x2fb010f
add ecx, 0x58cfebd5
add ecx, ebp
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edi
xor ecx, 0x7fffffa0
shr ecx, 1
xor ecx, edx
add ebp, 0x64bbb978
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x1c], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [esi + 0x3d0]
sar ecx, 6
mov edx, dword [esi + 0x490]
mov edi, dword [eax + 0xc]
mov eax, dword [esi + 0x514]
sub edx, dword [eax + ecx*4]
mov eax, dword [esi + 0x47c]
dec eax
imul ecx, edi, 0x42c3047
and edx, eax
mov eax, dword [esi + 0x488]
movzx edx, byte [edx + eax]
add ecx, ebp
imul eax, edx, 0x2fb010f
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edi
xor ecx, 0x7fffffa0
shr ecx, 1
xor ecx, edx
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x20], ecx
mov eax, dword [esi + 0x4e4]
mov ebx, dword [eax + 4]
mov eax, dword [esi + 0x524]
imul edx, ebx, 0x68e8143
mov edi, dword [eax + 4]
mov ebp, dword [eax]
add edx, dword [esp + 0x14]
imul ecx, edi, 0x42c3047
imul eax, ebp, 0x2fb010f
add edx, ecx
add eax, 0x7736085e
add eax, edx
mov ecx, eax
xor ecx, 0x400
shr ecx, 3
xor ecx, ebx
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebp
mov ebp, dword [esp + 0x1c]
shr ecx, 1
xor ecx, dword [esp + 0x18]
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x24], ecx
mov eax, dword [esi + 0x524]
imul ecx, ebp, 0x68e8143
mov edi, dword [eax + 4]
mov ebx, dword [eax]
imul edx, edi, 0x42c3047
imul eax, ebx, 0x2fb010f
add edx, dword [esp + 0x14]
add edx, ecx
add eax, 0x8321d601
add eax, edx
mov ecx, eax
xor ecx, 0x400
shr ecx, 3
xor ecx, ebp
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 1
mov ebx, dword [esp + 0x18]
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x28], ecx
mov eax, 0x55555556
mov ecx, dword [esi + 0x524]
imul dword [ecx + 8]
imul eax, dword [esp + 0x28], 0x2fb010f
mov edi, edx
shr edi, 0x1f
add edi, edx
mov edx, dword [ecx]
imul ecx, edi, 0x68e8143
mov dword [esp + 0x30], eax
imul eax, edx, 0x42c3047
add eax, dword [esp + 0x30]
add ecx, eax
mov eax, dword [esp + 0x14]
add eax, 0x8f0da3a4
add eax, ecx
mov ecx, eax
xor ecx, 0x600
shr ecx, 3
xor ecx, edi
shr ecx, 1
xor ecx, edx
shr ecx, 1
xor ecx, dword [esp + 0x28]
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x2c], ecx
mov eax, 0x55555556
mov ecx, dword [esi + 0x524]
imul dword [ecx + 0xc]
imul eax, dword [esp + 0x24], 0x2fb010f
mov edi, edx
shr edi, 0x1f
add edi, edx
mov edx, dword [ecx + 4]
imul ecx, edi, 0x68e8143
mov dword [esp + 0x2c], eax
imul eax, edx, 0x42c3047
add eax, dword [esp + 0x2c]
add ecx, eax
mov eax, dword [esp + 0x14]
add eax, 0x9af97147
add eax, ecx
mov ecx, eax
xor ecx, 0x600
shr ecx, 3
xor ecx, edi
shr ecx, 1
xor ecx, edx
shr ecx, 1
xor ecx, dword [esp + 0x24]
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x30], ecx
mov eax, dword [esi + 0x3d0]
mov edi, eax
and edi, 0x3f
cmp edi, 3
jbe 0x408aa2
mov edi, 3
sar eax, 2
mov dword [esp + 0x3c], eax
imul eax, eax, 0x2fb010f
imul ecx, edi, 0x42c3047
mov edx, dword [esp + 0x20]
add edx, 0xac428b4a
add eax, 0xa056bda7
add ecx, dword [esp + 0x14]
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edi
xor ecx, 0x7fffff80
shr ecx, 1
xor ecx, dword [esp + 0x3c]
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x34], ecx
mov ecx, dword [esi + 0x478]
sar ecx, 1
imul eax, ecx, 0x42c3047
add eax, dword [esp + 0x14]
add eax, edx
mov edx, eax
shr edx, 4
xor edx, ecx
xor edx, 0x7fffff80
shr edx, 1
xor edx, ebp
shr edx, 1
xor edx, ebx
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x38], edx
mov eax, 0x55555556
mov ecx, dword [esi + 0x524]
mov edi, dword [esi + 0x478]
sar edi, 2
imul dword [ecx + 0xc]
mov eax, 0x55555556
mov ebp, edx
shr ebp, 0x1f
add ebp, edx
imul dword [ecx + 8]
imul eax, edi, 0x2fb010f
shl ebp, 8
add ebp, dword [ecx + 4]
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
imul edx, ebp, 0x68e8143
shl ebx, 8
add ebx, dword [ecx]
add eax, 0xbebcda30
imul ecx, ebx, 0x42c3047
add edx, dword [esp + 0x14]
add edx, ecx
add eax, edx
mov ecx, eax
xor ecx, 0x800
shr ecx, 3
xor ecx, ebp
mov ebp, dword [esp + 0x18]
shr ecx, 1
xor ecx, ebx
mov ebx, dword [esp + 0x1c]
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebp
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x3c], ecx
mov edx, dword [esi + 0x4b4]
sar edx, 4
imul edi, ebx, 0x42c3047
mov ecx, dword [esp + 0x14]
imul eax, edx, 0x2fb010f
add ecx, 0xc41a2690
add eax, edi
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, ebx
xor ecx, 0x7fffff60
shr ecx, 1
xor ecx, edx
mov edx, dword [esp + 0x14]
shr ecx, 1
add edx, 0xd005f433
xor ecx, ebp
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x40], ecx
mov ecx, dword [esi + 0x4a4]
imul eax, ecx, 0x2fb010f
add eax, edi
add eax, edx
mov edx, eax
shr edx, 4
xor edx, ebx
xor edx, 0x7fffff60
shr edx, 1
xor edx, ecx
shr edx, 1
xor edx, ebp
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x44], edx
mov eax, dword [esi + 0x4e4]
mov ebp, dword [esi + 0x4c0]
mov ebx, dword [esi + 0x3d0]
sar ebx, 3
mov edi, dword [eax + 0xc]
imul edx, edi, 0x68e8143
sar ebp, 3
imul eax, ebx, 0x2fb010f
imul ecx, ebp, 0x42c3047
add edx, dword [esp + 0x14]
add eax, 0xe2804319
add edx, ecx
add eax, edx
mov ecx, eax
xor ecx, 0x800
shr ecx, 3
xor ecx, edi
shr ecx, 1
xor ecx, ebp
shr ecx, 1
xor ecx, ebx
shr ecx, 1
xor ecx, dword [esp + 0x18]
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x48], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [esi + 0x524]
mov ebp, dword [eax + 0x14]
mov eax, 0x55555556
imul dword [ecx + 4]
mov eax, 0x55555556
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
imul dword [ecx]
imul ecx, ebx, 0x42c3047
mov edi, edx
shr edi, 0x1f
add edi, edx
imul edx, ebp, 0x68e8143
imul eax, edi, 0x2fb010f
add edx, 0xee6c10bc
add edx, dword [esp + 0x14]
add edx, ecx
add eax, edx
mov ecx, eax
xor ecx, 0xa00
shr ecx, 3
xor ecx, ebp
mov ebp, dword [esp + 0x14]
shr ecx, 1
xor ecx, ebx
mov ebx, dword [esp + 0x18]
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x4c], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [esi + 0x490]
mov edi, dword [eax + 0x18]
mov eax, dword [esi + 0x470]
imul eax, dword [esi + 0x3e4]
sub ecx, eax
mov eax, dword [esi + 0x47c]
dec eax
and ecx, eax
mov eax, dword [esi + 0x488]
movzx edx, byte [ecx + eax]
imul ecx, edi, 0x42c3047
imul eax, edx, 0x2fb010f
add ecx, 0xf3c95d1c
add ecx, ebp
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edi
xor ecx, 0x7fffff40
shr ecx, 1
xor ecx, edx
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x50], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [esi + 0x3d0]
mov edx, dword [esi + 0x490]
sar ecx, 6
mov edi, dword [eax + 0x10]
mov eax, dword [esi + 0x514]
sub edx, dword [eax + ecx*4]
mov eax, dword [esi + 0x47c]
dec eax
imul ecx, edi, 0x42c3047
and edx, eax
mov eax, dword [esi + 0x488]
movzx edx, byte [edx + eax]
add ecx, 0xffb52abf
add ecx, ebp
imul eax, edx, 0x2fb010f
add eax, ecx
mov ecx, eax
shr ecx, 4
xor ecx, edi
xor ecx, 0x7fffff40
shr ecx, 1
xor ecx, edx
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x54], ecx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [eax + 8]
imul eax, ecx, 0x2fb010f
add eax, 0x774c81b
add eax, ebp
mov edx, eax
shr edx, 5
xor edx, ecx
xor edx, 0x40000050
shr edx, 1
xor edx, ebx
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x58], edx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [eax]
imul eax, ecx, 0x2fb010f
add eax, 0x774c81b
add eax, ebp
mov edx, eax
shr edx, 5
xor edx, ecx
xor edx, 0x40000050
shr edx, 1
xor edx, ebx
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x5c], edx
mov eax, dword [esi + 0x4e4]
mov ecx, dword [eax + 4]
imul eax, ecx, 0x2fb010f
add eax, 0x774c81b
add eax, ebp
mov edx, eax
shr edx, 5
xor edx, ecx
xor edx, 0x40000050
shr edx, 1
xor edx, ebx
shr edx, 3
xor edx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x60], edx
mov eax, dword [esi + 0x4e4]
mov edx, dword [eax + 0x18]
mov eax, dword [esi + 0x524]
imul ecx, edx, 0x68e8143
mov edi, dword [eax + 4]
imul eax, edi, 0x42c3047
add eax, dword [esp + 0x2c]
add ecx, eax
lea eax, [ebp + 0x1e1b4748]
add eax, ecx
mov ecx, eax
xor ecx, 0xc00
shr ecx, 3
xor ecx, edx
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, dword [esp + 0x24]
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x64], ecx
mov eax, dword [esi + 0x4e4]
mov edx, dword [eax + 0x10]
mov eax, dword [esi + 0x524]
imul ecx, edx, 0x68e8143
mov edi, dword [eax]
imul eax, edi, 0x42c3047
add eax, dword [esp + 0x30]
add ecx, eax
lea eax, [ebp + 0x2a0714eb]
add eax, ecx
mov ecx, eax
xor ecx, 0xc00
shr ecx, 3
xor ecx, edx
shr ecx, 1
xor ecx, edi
shr ecx, 1
xor ecx, dword [esp + 0x28]
shr ecx, 1
xor ecx, ebx
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x68], ecx
mov eax, dword [esi + 0x4e4]
mov edi, dword [eax + 0xc]
mov eax, dword [esi + 0x524]
imul edx, edi, 0x68e8143
mov ebx, dword [eax + 4]
mov ebp, dword [eax]
add edx, dword [esp + 0x14]
imul ecx, ebx, 0x42c3047
imul eax, ebp, 0x2fb010f
add edx, ecx
add eax, 0x35f2e28e
add eax, edx
mov ecx, eax
xor ecx, 0xc00
shr ecx, 3
xor ecx, edi
shr ecx, 1
xor ecx, ebx
shr ecx, 1
xor ecx, ebp
shr ecx, 1
xor ecx, dword [esp + 0x18]
shr ecx, 3
xor ecx, eax
mov eax, dword [esi + 0x38]
mov dword [eax + 0x6c], ecx
mov ecx, dword [esi + 0x330]
lea ebp, [esi + 0x60]
mov edx, 0x80
lea eax, [ecx + 1]
mov dword [esi + 0x330], eax
mov eax, dword [esi + 0x304]
mov word [eax + ecx*2], dx
mov eax, dword [esi + 0x664]
sub eax, 0
je 0x40910f
sub eax, 1
je 0x40904d
mov ecx, dword [esi + 0x3c0]
and ecx, 1
inc ecx
xor edi, edi
mov dword [esp + 0x34], ecx
mov eax, dword [esi + 0x48]
add dword [edi + eax], ecx
mov eax, dword [esi + 0x48]
mov ecx, dword [ebp - 0x10]
mov eax, dword [edi + eax]
movzx eax, byte [eax]
mov dword [esp + 0x38], eax
mov eax, dword [esi]
mov edx, dword [eax]
mov eax, dword [ebp]
lea eax, [eax + ecx*4]
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov ecx, eax
mov ebx, eax
and ecx, 0x3ff
shr ebx, 0xa
cmp ecx, 0x3ff
jae 0x408fe1
inc eax
jmp 0x408fe6
or eax, 0x3ff
shl edx, 0x16
add edi, 4
sub edx, ebx
sar edx, 3
imul edx, dword [ecx*4 + 0x4452c0]
mov ecx, dword [esp + 0x38]
and edx, 0xfffffc00
add edx, eax
mov eax, dword [esp + 0x3c]
mov dword [eax], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp]
add ebp, 0x18
mov eax, dword [eax + ecx*4]
mov ecx, dword [esi + 0x330]
shr eax, 0x14
movzx edx, word [eax*2 + 0x4332c0]
lea eax, [ecx + 1]
mov dword [esi + 0x330], eax
mov eax, dword [esi + 0x304]
mov word [eax + ecx*2], dx
mov ecx, dword [esp + 0x34]
cmp edi, 0x70
jl 0x408fa3
jmp 0x4092b4
mov eax, dword [esi + 0x3c0]
and eax, 1
lea ecx, [eax*2 + 1]
add ecx, eax
xor edi, edi
mov dword [esp + 0x34], ecx
mov eax, dword [esi + 0x48]
add dword [edi + eax], ecx
mov eax, dword [esi + 0x48]
mov ecx, dword [ebp - 0x10]
mov eax, dword [edi + eax]
movzx eax, byte [eax]
mov dword [esp + 0x38], eax
mov eax, dword [esi]
mov edx, dword [eax]
mov eax, dword [ebp]
lea eax, [eax + ecx*4]
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov ecx, eax
mov ebx, eax
and ecx, 0x3ff
shr ebx, 0xa
cmp ecx, 0x3ff
jae 0x4090a3
inc eax
jmp 0x4090a8
or eax, 0x3ff
shl edx, 0x16
add edi, 4
sub edx, ebx
sar edx, 3
imul edx, dword [ecx*4 + 0x4452c0]
mov ecx, dword [esp + 0x38]
and edx, 0xfffffc00
add edx, eax
mov eax, dword [esp + 0x3c]
mov dword [eax], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp]
add ebp, 0x18
mov eax, dword [eax + ecx*4]
mov ecx, dword [esi + 0x330]
shr eax, 0x14
movzx edx, word [eax*2 + 0x4332c0]
lea eax, [ecx + 1]
mov dword [esi + 0x330], eax
mov eax, dword [esi + 0x304]
mov word [eax + ecx*2], dx
mov ecx, dword [esp + 0x34]
cmp edi, 0x70
jl 0x409065
jmp 0x4092b4
xor ebx, ebx
mov dword [esp + 0x28], ebx
mov eax, dword [esi + 0x38]
mov ecx, dword [ebx + eax]
mov eax, ecx
shr eax, 0x10
xor ebx, ebx
xor eax, ecx
movzx edi, ax
lea eax, [ecx*8]
mov ecx, dword [esi + 0x24]
and eax, dword [esi + 0x28]
mov dword [esp + 0x3c], eax
lea eax, [eax + eax*8]
mov dword [esp + 0x2c], eax
add ecx, eax
cmp byte [ecx + 2], 0
mov edx, ecx
je 0x40915b
movzx eax, word [ecx]
cmp eax, edi
je 0x40915e
inc ebx
add ecx, 9
cmp ebx, 8
jl 0x409141
jmp 0x40915e
mov word [ecx], di
mov dword [esp + 0x30], ebx
test ebx, ebx
je 0x409208
cmp ebx, 8
jne 0x4091bf
mov ecx, dword [esp + 0x3c]
xor eax, eax
mov edx, dword [esp + 0x30]
mov ebx, 7
mov dword [esp + 0x40], eax
mov dword [esp + 0x38], eax
mov byte [esp + 0x13], al
mov eax, dword [esi + 0x24]
mov word [esp + 0x40], di
lea edi, [ecx + edx]
add edx, ecx
mov ecx, dword [esi + 0x24]
lea eax, [eax + edi*8]
mov al, byte [edi + eax - 7]
lea ecx, [ecx + edx*8]
cmp al, byte [edx + ecx - 0x10]
jbe 0x4091b1
mov ebx, dword [esp + 0x30]
add ebx, 0xfffffffe
mov eax, dword [esp + 0x40]
mov edi, dword [esp + 0x38]
mov dword [esp + 0x30], eax
jmp 0x4091cf
mov eax, dword [edx]
mov edi, dword [edx + 4]
mov dword [esp + 0x30], eax
mov al, byte [edx + 8]
mov byte [esp + 0x13], al
mov eax, dword [esi + 0x24]
mov ecx, dword [esp + 0x2c]
add ecx, eax
lea eax, [ebx + ebx*8]
push eax
push ecx
lea eax, [ecx + 9]
push eax
call fcn.00401600
mov ecx, dword [esp + 0x38]
add esp, 0xc
mov eax, dword [esi + 0x24]
mov edx, dword [esp + 0x30]
mov dword [eax + ecx], edx
mov dl, byte [esp + 0x13]
mov dword [eax + ecx + 4], edi
mov byte [eax + ecx + 8], dl
mov edx, dword [esi + 0x24]
add edx, ecx
mov eax, dword [esi + 0x48]
lea ecx, [edx + 2]
mov ebx, dword [esp + 0x28]
mov dword [ebx + eax], ecx
mov eax, dword [esi + 0x48]
mov ecx, dword [ebp - 0x10]
mov eax, dword [ebx + eax]
movzx eax, byte [eax]
mov dword [esp + 0x38], eax
mov eax, dword [esi]
mov edx, dword [eax]
mov eax, dword [ebp]
lea eax, [eax + ecx*4]
mov dword [esp + 0x3c], eax
mov eax, dword [eax]
mov ecx, eax
mov edi, eax
and ecx, 0x3ff
shr edi, 0xa
cmp ecx, 0x3ff
jae 0x40924d
inc eax
jmp 0x409252
or eax, 0x3ff
shl edx, 0x16
add ebx, 4
sub edx, edi
mov dword [esp + 0x28], ebx
sar edx, 3
imul edx, dword [ecx*4 + 0x4452c0]
mov ecx, dword [esp + 0x38]
and edx, 0xfffffc00
add edx, eax
mov eax, dword [esp + 0x3c]
mov dword [eax], edx
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp]
add ebp, 0x18
mov eax, dword [eax + ecx*4]
mov ecx, dword [esi + 0x330]
shr eax, 0x14
movzx edx, word [eax*2 + 0x4332c0]
lea eax, [ecx + 1]
mov dword [esi + 0x330], eax
mov eax, dword [esi + 0x304]
mov word [eax + ecx*2], dx
cmp ebx, 0x70
jl 0x409115
mov edx, dword [esi + 0x328]
xor ebx, ebx
cmp dword [esi + 0x478], ebx
mov ecx, dword [esi + 0x32c]
sete bl
mov ebp, dword [esp + 0x18]
lea eax, [edx + 1]
add ecx, ebx
mov dword [esi + 0x328], eax
and ebp, 0x1ff
mov eax, dword [esi + 0x324]
mov dword [eax + edx*4], ecx
add dword [esi + 0x32c], 2
mov edx, dword [esi + 0x328]
mov ecx, dword [esi + 0x32c]
add ecx, dword [esp + 0x1c]
lea eax, [edx + 1]
mov dword [esi + 0x328], eax
mov eax, dword [esi + 0x324]
mov dword [eax + edx*4], ecx
lea ecx, [esi + 0x2ec]
add dword [esi + 0x32c], 0x100
mov edi, dword [esi + 0x328]
mov edx, dword [esi + 0x32c]
add edx, ebp
lea eax, [edi + 1]
mov dword [esi + 0x328], eax
mov eax, dword [esi + 0x324]
mov dword [eax + edi*4], edx
add dword [esi + 0x32c], 0x200
call fcn.0040bb30
mov edi, dword [esi + 0x14]
mov ebx, eax
push 0x3ff
mov edx, dword [edi + 0x44]
movzx eax, word [ebx*2 + 0x4332c0]
lea ecx, [edx + 1]
mov dword [edi + 0x44], ecx
mov ecx, dword [edi + 0x18]
mov word [ecx + edx*2], ax
lea ecx, [esi + 0x364]
mov eax, dword [esi + 0x4e4]
mov eax, dword [eax + 4]
and eax, 0x3f
shl eax, 9
or eax, ebp
push eax
mov eax, dword [esi]
push ebx
push dword [eax]
call fcn.0040ba80
mov ecx, dword [esp + 0x18]
movzx edi, cl
mov ecx, dword [esp + 0x1c]
shl ecx, 8
push 0xff
or ecx, edi
push ecx
push eax
mov eax, dword [esi]
lea ecx, [esi + 0x37c]
push dword [eax]
call fcn.0040ba80
mov edx, dword [esi + 0x14]
movzx esi, word [eax*2 + 0x4332c0]
mov ecx, dword [edx + 0x44]
lea eax, [ecx + 1]
mov dword [edx + 0x44], eax
mov eax, dword [edx + 0x18]
mov word [eax + ecx*2], si
lea eax, [edi + 2]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x3c
ret
mov dword [esi + 0x394], 0
mov eax, dword [esi + 0x398]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x3c
ret