Function at 0x10189f60
Capabilities:
Encrypt data using rc4 ksa

Disassembly:
sub esp, 0xa4
mov eax, dword [0x10411ce0]
xor eax, esp
mov dword [esp + 0xa0], eax
push esi
push edi
mov edi, dword [esp + 0xb0]
mov esi, 0x20
mov dword [esp + 8], edi
mov dword [esp + 0x28], 0
movzx eax, byte [edi + 2]
movzx eax, byte [eax + 0x1035922c]
mov dword [esp + 0x24], eax
test eax, eax
jle 0x10189feb
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x10189fc4
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x10189fd1
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x98], dl
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jl 0x10189fa1
mov eax, dword [esp + 0x24]
mov dword [esp + 0x28], 0
test eax, eax
jle 0x1018a046
jmp 0x1018a000
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a023
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a030
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0x90], dl
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jl 0x1018a000
xor eax, eax
cmp byte [edi + 2], al
sete al
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a075
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a082
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a158
mov eax, dword [edi + 0x33c]
cmp eax, 8
jbe 0x1018a0af
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
sar edx, 0x18
add eax, 0xfffffff8
mov dword [edi + 0x33c], eax
jmp 0x1018a0bc
push 8
push edi
call fcn.1018fef0
add esp, 8
mov edx, eax
cmp dword [edi + 0x30], 0
jne 0x1018a0cf
cmp dword [edi + 0x12bc], 0
je 0x1018a158
mov eax, edx
mov ecx, 0x10358f70
and edx, 0x1f
sar eax, 5
or edx, esi
shl eax, 3
shl edx, 0xd
sub ecx, eax
mov eax, dword [edi + 0x4c]
mov dword [esp + 0x14], eax
movd xmm0, edx
cvtdq2pd xmm0, xmm0
mulsd xmm0, qword [ecx]
test eax, eax
je 0x1018a11f
push dword [edi + 0x48]
sub esp, 8
movsd qword [esp], xmm0
call dword [esp + 0x20]
fstp qword [esp + 0xac]
movsd xmm0, qword [esp + 0xac]
add esp, 0xc
cmp dword [edi + 0x12bc], 0
je 0x1018a139
cmp dword [edi + 0x12c0], 0
je 0x1018a139
movsd xmm0, qword [edi + 0x12c8]
movsd xmm1, qword [0x103d5688]
subsd xmm0, xmm1
mulsd xmm0, qword [edi + 0x38]
addsd xmm0, xmm1
mulsd xmm0, qword [edi + 0x20]
movsd qword [edi + 0x40], xmm0
mov ecx, dword [esp + 0x28]
mov eax, ecx
dec ecx
mov dword [esp + 0x28], ecx
test eax, eax
jne 0x1018a052
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a18e
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a19b
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a39f
mov eax, dword [edi + 0x33c]
mov byte [edi + 0x50], 0
cmp eax, 1
jbe 0x1018a1ca
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a1d7
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a39f
cmp dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
jle 0x1018a236
mov edi, edi
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a213
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a220
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x28]
mov ecx, eax
shl dl, cl
inc eax
or byte [edi + 0x50], dl
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jl 0x1018a1f0
mov al, byte [edi + 2]
cmp al, 1
jbe 0x1018a3f6
cmp al, 2
jne 0x1018a278
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a268
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a275
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov byte [edi + 0x51], dl
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a2a1
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [esp + 0x28], edx
mov dword [edi + 0x33c], eax
jmp 0x1018a2b0
push 4
push edi
call fcn.1018fe60
add esp, 8
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a2d5
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a2e2
push 4
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, edx
mov dword [esp + 0x1c], edx
mov edx, dword [esp + 0x28]
sub eax, edx
add eax, 3
mov dword [esp + 0x28], eax
js 0x1018a3f6
mov ecx, dword [esp + 0x1c]
mov byte [edi + 0x329], al
mov al, byte [edx + 0x103fcef4]
mov byte [edi + 0x328], al
mov al, dl
add dl, dl
mov dword [edi + 0x54], 0
add al, dl
mov dword [esp + 0x20], 0
shl al, 2
add al, 0x25
mov byte [edi + 0x52], al
mov al, cl
add cl, cl
add al, cl
shl al, 2
add al, 0x49
mov byte [edi + 0x53], al
mov eax, dword [esp + 0x28]
dec eax
test eax, eax
jle 0x1018a39f
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a368
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a375
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a38d
mov ecx, dword [esp + 0x20]
mov eax, 1
shl eax, cl
or dword [edi + 0x54], eax
dec byte [edi + 0x329]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x28]
inc eax
dec ecx
mov dword [esp + 0x20], eax
cmp eax, ecx
jl 0x1018a345
cmp byte [edi + 0x50], 0
je 0x1018a5f8
xor eax, eax
xor ecx, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], ecx
cmp dword [esp + 0x24], eax
jle 0x1018a55e
lea eax, [edi + 0x58]
mov dword [esp + 0x20], eax
mov al, byte [edi + 0x50]
shr al, cl
test al, 1
je 0x1018a53f
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a412
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a41f
pop edi
mov eax, 1
pop esi
mov ecx, dword [esp + 0xa0]
xor ecx, esp
call fcn.102d6d23
add esp, 0xa4
ret
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a53f
mov eax, dword [edi + 0x33c]
mov dword [esp + 0x10], 1
cmp eax, 2
jbe 0x1018a454
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1e
add eax, 0xfffffffe
mov dword [edi + 0x33c], eax
jmp 0x1018a461
push 2
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
cmp byte [edi + 0x329], 0
lea eax, [edx + edx*2]
mov dword [esp + 0x14], eax
mov dword [esp + 0x28], 0
jbe 0x1018a53f
mov eax, dword [esp + 0x20]
mov dword [esp + 0x1c], eax
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a4aa
mov ecx, esi
mov esi, dword [edi + 0x340]
sub ecx, eax
shl esi, cl
shr esi, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a4b7
push 4
push edi
call fcn.1018fe60
add esp, 8
mov esi, eax
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a4df
mov edx, dword [edi + 0x340]
mov ecx, 0x20
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a4ec
push 4
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
cmp esi, 0xf
jne 0x1018a4f6
shl edx, 0xe
jmp 0x1018a4fc
or edx, 0x10
shl edx, 0xd
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add eax, esi
movd xmm0, edx
mov esi, 0x20
mov edx, dword [esp + 0x28]
cvtdq2pd xmm0, xmm0
inc edx
mov dword [esp + 0x28], edx
mulsd xmm0, qword [eax*8 + 0x10358f58]
movsd qword [ecx], xmm0
add ecx, 8
movzx eax, byte [edi + 0x329]
mov dword [esp + 0x1c], ecx
cmp edx, eax
jl 0x1018a485
mov ecx, dword [esp + 0xc]
add dword [esp + 0x20], 0x90
inc ecx
mov dword [esp + 0xc], ecx
cmp ecx, dword [esp + 0x24]
jl 0x1018a3c6
mov eax, dword [esp + 0x10]
cmp byte [edi + 2], 2
jne 0x1018a6af
cmp byte [edi + 0x51], 0
je 0x1018a5f8
test eax, eax
je 0x1018a5f8
cmp byte [edi + 0x329], 0
mov dword [esp + 0x28], 0
jbe 0x1018a5f8
lea eax, [edi + 0xe8]
mov dword [esp + 0x20], eax
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a5b8
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a5c5
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov ecx, dword [esp + 0x20]
test edx, edx
je 0x1018a5dd
movsd xmm0, qword [ecx]
xorpd xmm0, xmmword [0x103592e0]
movsd qword [ecx], xmm0
mov edx, dword [esp + 0x28]
add ecx, 8
movzx eax, byte [edi + 0x329]
inc edx
mov dword [esp + 0x28], edx
mov dword [esp + 0x20], ecx
cmp edx, eax
jl 0x1018a595
cmp byte [edi + 2], 2
jne 0x1018a6af
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a625
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a632
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018a6af
cmp byte [edi + 0x50], 0
mov byte [edi + 0x32a], 0
je 0x1018a651
movzx eax, byte [edi + 0x52]
mov dword [esp + 0x1c], eax
jmp 0x1018a659
mov dword [esp + 0x1c], 0xfd
mov dword [esp + 0x28], 0
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a684
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018a691
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov ecx, dword [esp + 0x28]
shl dl, cl
or byte [edi + 0x32a], dl
mov eax, dword [ecx*4 + 0x103fcee4]
inc ecx
mov dword [esp + 0x28], ecx
cmp eax, dword [esp + 0x1c]
jl 0x1018a661
cmp byte [edi + 0x50], 0
mov byte [esp + 0x20], 0
mov byte [esp + 0x18], 0
je 0x1018a6f7
mov eax, dword [edi + 0x33c]
cmp eax, 2
jbe 0x1018a6e8
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1e
add eax, 0xfffffffe
mov dword [esp + 0x20], edx
mov dword [edi + 0x33c], eax
jmp 0x1018a6f7
push 2
push edi
call fcn.1018fe60
add esp, 8
mov dword [esp + 0x20], eax
cmp dword [esp + 0x24], 0
mov dword [esp + 0x28], 0
jle 0x1018a758
jmp 0x1018a710
mov eax, dword [edi + 0x33c]
cmp eax, 2
jbe 0x1018a735
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1e
add eax, 0xfffffffe
mov dword [edi + 0x33c], eax
jmp 0x1018a742
push 2
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x28]
mov byte [esp + eax + 0xa0], dl
inc eax
mov dword [esp + 0x28], eax
cmp eax, dword [esp + 0x24]
jl 0x1018a710
cmp byte [edi + 3], 0
je 0x1018a794
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018a785
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [esp + 0x18], edx
mov dword [edi + 0x33c], eax
jmp 0x1018a794
push 1
push edi
call fcn.1018fe60
add esp, 8
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
xor edx, edx
mov dword [esp + 0x28], edx
test eax, eax
jle 0x1018a823
cmp byte [esp + edx + 0xa0], 0
je 0x1018a81a
mov al, byte [edi + 0x50]
mov cl, dl
shr al, cl
test al, 1
je 0x1018a7c7
mov al, byte [edi + 0x52]
mov byte [edi + edx + 0x32b], al
jmp 0x1018a816
mov eax, dword [edi + 0x33c]
cmp eax, 6
jbe 0x1018a7ec
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1a
add eax, 0xfffffffa
mov dword [edi + 0x33c], eax
jmp 0x1018a7f9
push 6
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
cmp edx, 0x3c
jg 0x1018a3f6
mov cl, dl
add dl, dl
add dl, 0x49
add cl, dl
mov edx, dword [esp + 0x28]
mov byte [edi + edx + 0x32b], cl
mov eax, dword [esp + 0x24]
inc edx
mov dword [esp + 0x28], edx
cmp edx, eax
jl 0x1018a7a6
mov eax, dword [esp + 0x20]
mov byte [esp + 0x2f], 0
test al, al
je 0x1018a8b7
movzx eax, al
mov esi, 3
mov dword [esp + 0x14], eax
mov byte [esp + 0x2f], 0x40
lea ecx, [eax - 1]
movzx eax, byte [edi + 0x53]
shl esi, cl
movzx ecx, byte [edi + 0x52]
sub eax, ecx
cdq
idiv esi
mov esi, eax
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a881
mov edx, dword [edi + 0x340]
mov ecx, 0x20
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a88e
push 4
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
movzx ecx, byte [edi + 0x52]
add dl, dl
add ecx, 0x4b3
movzx eax, dl
add ecx, edi
push ecx
push eax
push esi
push dword [esp + 0x20]
push edi
call fcn.1018c8f0
add esp, 0x14
test eax, eax
jne 0x1018a3f6
xor edx, edx
mov dword [esp + 0x20], edx
cmp dword [esp + 0x24], edx
jle 0x1018a9a4
lea esi, [edi + 0x6b4]
mov dword [esp + 0x28], esi
mov ah, byte [esp + edx + 0xa0]
test ah, ah
je 0x1018a98b
mov ecx, edx
mov al, 1
shl al, cl
mov esi, 3
or byte [esp + 0x2f], al
movzx eax, ah
mov dword [esp + 0x1c], eax
lea ecx, [eax - 1]
movzx eax, byte [edi + edx + 0x32b]
add eax, 0xfffffffc
shl esi, cl
add eax, esi
cdq
idiv esi
mov dword [esp + 0x14], eax
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a937
mov edx, dword [edi + 0x340]
mov ecx, 0x20
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a944
push 4
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov esi, dword [esp + 0x28]
push esi
push edx
push dword [esp + 0x1c]
mov byte [esi - 1], dl
push dword [esp + 0x28]
push edi
call fcn.1018c8f0
add esp, 0x14
test eax, eax
jne 0x1018a3f6
mov eax, dword [edi + 0x33c]
cmp eax, 2
jbe 0x1018a97c
add eax, 0xfffffffe
mov dword [edi + 0x33c], eax
jmp 0x1018a987
push 2
push edi
call fcn.1018fe60
add esp, 8
mov edx, dword [esp + 0x20]
inc edx
add esi, 0x200
mov dword [esp + 0x20], edx
mov dword [esp + 0x28], esi
cmp edx, dword [esp + 0x24]
jl 0x1018a8d1
cmp byte [esp + 0x18], 0
je 0x1018aa0e
or byte [esp + 0x2f], 0x20
mov eax, dword [edi + 0x33c]
cmp eax, 4
jbe 0x1018a9d8
mov edx, dword [edi + 0x340]
mov ecx, 0x20
sub ecx, eax
shl edx, cl
shr edx, 0x1c
add eax, 0xfffffffc
mov dword [edi + 0x33c], eax
jmp 0x1018a9e5
push 4
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [esp + 0x18]
lea ecx, [edi + 0x10b4]
push ecx
push edx
push 2
movzx eax, al
push eax
push edi
mov byte [edi + 0x10b3], dl
call fcn.1018c8f0
add esp, 0x14
test eax, eax
jne 0x1018a3f6
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018aa36
mov edx, dword [edi + 0x340]
mov esi, 0x20
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018aa48
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov esi, 0x20
test edx, edx
je 0x1018aa8a
mov eax, dword [edi + 0x33c]
mov byte [esp + 0x2f], 0x7f
cmp eax, 0xb
jbe 0x1018aa76
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x15
add eax, 0xfffffff5
mov dword [edi + 0x33c], eax
jmp 0x1018aa83
push 0xb
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov word [edi + 0x330], dx
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018aaad
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018aaba
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018abd6
mov eax, dword [edi + 0x33c]
mov byte [esp + 0x2f], 0x7f
cmp eax, 6
jbe 0x1018aaec
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1a
add eax, 0xfffffffa
mov dword [edi + 0x33c], eax
jmp 0x1018aaf9
push 6
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
cmp byte [edi + 0x50], 0
mov byte [edi + 0x344], dl
je 0x1018ab3d
mov eax, dword [edi + 0x33c]
cmp eax, 7
jbe 0x1018ab2a
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x19
add eax, 0xfffffff9
mov dword [edi + 0x33c], eax
jmp 0x1018ab37
push 7
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov byte [edi + 0x345], dl
mov ecx, dword [esp + 0x24]
test ecx, ecx
jle 0x1018ab98
lea eax, [edi + 0x379]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
mov eax, dword [edi + 0x33c]
cmp eax, 7
jbe 0x1018ab78
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x19
add eax, 0xfffffff9
mov dword [edi + 0x33c], eax
jmp 0x1018ab85
push 7
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov ecx, dword [esp + 0x28]
mov byte [ecx], dl
add ecx, 0x34
dec dword [esp + 0x1c]
mov dword [esp + 0x28], ecx
jne 0x1018ab53
cmp byte [edi + 3], 0
je 0x1018abd6
mov eax, dword [edi + 0x33c]
cmp eax, 7
jbe 0x1018abc3
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x19
add eax, 0xfffffff9
mov dword [edi + 0x33c], eax
jmp 0x1018abd0
push 7
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov byte [edi + 0x47d], dl
cmp byte [edi + 0x50], 0
je 0x1018ac95
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018ac03
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018ac10
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018ac95
or byte [esp + 0x2f], 0x40
mov eax, dword [edi + 0x33c]
cmp eax, 3
jbe 0x1018ac42
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1d
add eax, 0xfffffffd
mov dword [edi + 0x33c], eax
jmp 0x1018ac4f
push 3
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov eax, dword [edi + 0x33c]
mov cl, 9
sub cl, dl
mov byte [edi + 0x4b1], cl
cmp eax, 3
jbe 0x1018ac7e
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1d
add eax, 0xfffffffd
mov dword [edi + 0x33c], eax
jmp 0x1018ac8b
push 3
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov cl, 9
sub cl, dl
mov byte [edi + 0x4b2], cl
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018acb8
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018acc5
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018adea
cmp byte [edi + 0x50], 0
mov byte [esp + 0x2f], 0x7f
je 0x1018ad10
mov eax, dword [edi + 0x33c]
cmp eax, 2
jbe 0x1018acfd
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1e
add eax, 0xfffffffe
mov dword [edi + 0x33c], eax
jmp 0x1018ad0a
push 2
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov byte [edi + 0x346], dl
mov ecx, dword [esp + 0x24]
test ecx, ecx
jle 0x1018ad75
lea eax, [edi + 0x37a]
mov dword [esp + 0x1c], ecx
mov dword [esp + 0x28], eax
jmp 0x1018ad30
mov eax, dword [edi + 0x33c]
cmp eax, 2
jbe 0x1018ad55
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1e
add eax, 0xfffffffe
mov dword [edi + 0x33c], eax
jmp 0x1018ad62
push 2
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
mov ecx, dword [esp + 0x28]
mov byte [ecx], dl
add ecx, 0x34
dec dword [esp + 0x1c]
mov dword [esp + 0x28], ecx
jne 0x1018ad30
cmp byte [edi + 0x50], 0
je 0x1018ad9c
cmp byte [edi + 0x346], 1
jne 0x1018ad9c
lea eax, [edi + 0x347]
push eax
push edi
call fcn.1018c7a0
add esp, 8
test eax, eax
jne 0x1018a3f6
mov edx, dword [esp + 0x24]
xor ecx, ecx
mov dword [esp + 0x28], ecx
test edx, edx
jle 0x1018adf9
lea eax, [edi + 0x37b]
mov dword [esp + 0x1c], eax
cmp byte [eax - 1], 1
jne 0x1018add8
push eax
push edi
call fcn.1018c7a0
add esp, 8
test eax, eax
jne 0x1018a3f6
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x28]
mov edx, dword [esp + 0x24]
inc ecx
add eax, 0x34
mov dword [esp + 0x28], ecx
mov dword [esp + 0x1c], eax
cmp ecx, edx
jl 0x1018adb4
jmp 0x1018adf9
cmp byte [esp + 0x2f], 0
je 0x1018afb7
mov edx, dword [esp + 0x24]
cmp byte [edi + 0x344], 0
jne 0x1018aeab
cmp byte [edi + 0x50], 0
je 0x1018ae19
test byte [edi + 0x345], 0xf8
jne 0x1018aeab
cmp byte [edi + 3], 0
je 0x1018ae2c
test byte [edi + 0x47d], 0xf8
jne 0x1018aeab
xor ecx, ecx
test edx, edx
jle 0x1018ae45
lea eax, [edi + 0x379]
test byte [eax], 0xf8
jne 0x1018aeab
inc ecx
add eax, 0x34
cmp ecx, edx
jl 0x1018ae38
push 0x100
lea eax, [edi + 0x5b3]
push 0
push eax
call fcn.102dad40
mov ecx, dword [esp + 0x30]
add esp, 0xc
test ecx, ecx
jle 0x1018ae90
lea eax, [edi + 0x7b3]
mov dword [esp + 0x28], ecx
mov edi, eax
nop
push 0x100
push 0
push edi
call fcn.102dad40
add esp, 0xc
add edi, 0x200
dec dword [esp + 0x28]
jne 0x1018ae70
mov edi, dword [esp + 8]
push 0x100
lea eax, [edi + 0x11b3]
push 0
push eax
call fcn.102dad40
add esp, 0xc
jmp 0x1018afb7
cmp byte [edi + 0x50], 0
mov al, byte [esp + 0x2f]
je 0x1018aefc
test al, 0x40
je 0x1018aefc
lea eax, [edi + 0x4b3]
push eax
movzx eax, byte [edi + 0x4b2]
shl eax, 8
push eax
movzx eax, byte [edi + 0x4b1]
shl eax, 8
push eax
movzx eax, byte [edi + 0x53]
push eax
movzx eax, byte [edi + 0x52]
push eax
movzx eax, byte [edi + 0x328]
push eax
lea eax, [edi + 0x345]
push eax
push edi
call fcn.1018c9e0
mov al, byte [esp + 0x4f]
add esp, 0x20
xor ecx, ecx
mov dword [esp + 0x28], ecx
cmp dword [esp + 0x24], ecx
jle 0x1018af82
movzx eax, al
lea edx, [edi + 0x379]
mov dword [esp + 0x14], eax
lea eax, [edi + 0x6b3]
mov dword [esp + 0x18], edx
mov dword [esp + 0x20], eax
jmp 0x1018af30
mov edx, dword [esp + 0x18]
mov eax, 1
shl eax, cl
test dword [esp + 0x14], eax
je 0x1018af68
push dword [esp + 0x20]
movzx eax, byte [edi + ecx + 0x32b]
push 0
push 0
push eax
push 0
push 0
push edx
push edi
call fcn.1018c9e0
mov ecx, dword [esp + 0x48]
add esp, 0x20
mov edx, dword [esp + 0x18]
add dword [esp + 0x20], 0x200
inc ecx
add edx, 0x34
mov dword [esp + 0x28], ecx
mov dword [esp + 0x18], edx
cmp ecx, dword [esp + 0x24]
jl 0x1018af30
cmp byte [edi + 3], 0
je 0x1018afb7
test byte [esp + 0x2f], 0x20
je 0x1018afb7
lea eax, [edi + 0x10b3]
mov byte [edi + 0x47e], 2
push eax
push 0
push 0
push 7
push 0
push 0
lea eax, [edi + 0x47d]
push eax
push edi
call fcn.1018c9e0
add esp, 0x20
mov eax, dword [edi + 0x33c]
cmp eax, 1
jbe 0x1018afda
mov edx, dword [edi + 0x340]
mov ecx, esi
sub ecx, eax
shl edx, cl
shr edx, 0x1f
dec eax
mov dword [edi + 0x33c], eax
jmp 0x1018afe7
push 1
push edi
call fcn.1018fe60
add esp, 8
mov edx, eax
test edx, edx
je 0x1018b056
mov edx, dword [edi + 0x33c]
cmp edx, 9
jbe 0x1018b016
mov eax, dword [edi + 0x340]
sub esi, edx
mov ecx, esi
mov dword [esp + 0x14], eax
mov esi, eax
lea eax, [edx - 9]
shl esi, cl
shr esi, 0x17
mov dword [edi + 0x33c], eax
jmp 0x1018b023
push 9
push edi
call fcn.1018fe60
add esp, 8
mov esi, eax
test esi, esi
je 0x1018b056
jmp 0x1018b030
mov eax, dword [edi + 0x33c]
dec esi
cmp eax, 8
jbe 0x1018b047
add eax, 0xfffffff8
mov dword [edi + 0x33c], eax
jmp 0x1018b052
push 8
push edi
call fcn.1018fe60
add esp, 8
test esi, esi
jne 0x1018b030
mov eax, dword [edi + 0x18]
mov esi, dword [edi + 0x12b4]
mov dword [esp + 0x20], esi
test al, 0x10
je 0x1018b071
add esi, 0x800
mov dword [esp + 0x20], esi
movups xmm0, xmmword [edi + 8]
sub esp, 0x18
movups xmmword [esp + 8], xmm0
movsd xmm0, qword [edi + 0x40]
movsd qword [esp], xmm0
push eax
movzx eax, byte [edi + 2]
push eax
lea eax, [esp + 0x88]
push eax
call fcn.1018d540
xor ecx, ecx
mov dword [esp + 0x38], eax
add esp, 0x24
mov dword [esp + 0x60], 0xffffffff
mov dword [esp + 0x5c], 0xffffffff
mov dword [esp + 0x58], 0xffffffff
mov byte [esp + 0x2f], 0
mov dword [esp + 0x18], ecx
cmp dword [esp + 0x24], ecx
jle 0x1018b1d2
lea eax, [edi + 0x6b3]
mov dword [esp + 0x28], ecx
mov dword [esp + 0x10], eax
lea edx, [edi + 0x32b]
lea eax, [esp + 0x90]
mov dword [esp + 0x1c], edx
sub eax, edx
mov dword [esp + 0xc], esi
mov dword [esp + 0xa4], eax
lea ebx, [ebx]
movzx eax, byte [edx]
movsd xmm0, qword [esp + ecx*8 + 0x68]
push eax
mov eax, dword [esp + 0xa8]
movzx eax, byte [eax + edx]
push eax
sub esp, 8
lea eax, [esp + 0x40]
movsd qword [esp], xmm0
push eax
push dword [esp + 0x24]
push dword [esp + 0x24]
push edi
call fcn.1018bea0
mov al, byte [edi + 0x50]
add esp, 0x20
mov cl, byte [esp + 0x18]
shr al, cl
test al, 1
je 0x1018b177
cmp byte [esp + 0x2f], 0
jne 0x1018b16d
lea eax, [esp + 0x90]
mov byte [esp + 0x2f], 1
push eax
lea eax, [esp + 0x34]
push eax
push esi
lea eax, [esp + 0x74]
push eax
push dword [esp + 0x34]
push edi
call fcn.1018c310
add esp, 0x18
movzx ecx, byte [edi + 0x53]
mov edx, dword [esp + 0x1c]
jmp 0x1018b17e
mov edx, dword [esp + 0x1c]
movzx ecx, byte [edx]
mov eax, dword [esp + 0x28]
xorps xmm3, xmm3
add eax, ecx
lea eax, [esi + eax*8]
lea ebx, [ebx]
movsd qword [eax], xmm3
inc ecx
add eax, 8
cmp ecx, 0x100
jl 0x1018b190
mov ecx, dword [esp + 0x18]
inc edx
add dword [esp + 0x10], 0x200
inc ecx
add dword [esp + 0xc], 0x800
add dword [esp + 0x28], 0x100
mov dword [esp + 0x18], ecx
mov dword [esp + 0x1c], edx
cmp ecx, dword [esp + 0x24]
jl 0x1018b100
jmp 0x1018b1d5
xorps xmm3, xmm3
cmp byte [edi + 2], 2
jne 0x1018b27a
mov al, byte [edi + 0x32b]
mov cl, byte [edi + 0x32c]
cmp al, cl
movzx eax, al
jb 0x1018b1f5
movzx eax, cl
movzx ecx, byte [edi + 0x32a]
mov edx, 0x103fcee4
mov dword [esp + 0x18], eax
mov eax, 0xd
lea ebx, [ebx]
test cl, 1
jne 0x1018b21e
mov eax, dword [edx]
sar ecx, 1
add edx, 4
jmp 0x1018b274
sar ecx, 1
mov dword [esp + 0xa4], ecx
mov ecx, dword [edx]
add edx, 4
cmp ecx, dword [esp + 0x18]
cmovg ecx, dword [esp + 0x18]
jmp 0x1018b240
movsd xmm1, qword [esi + eax*8 + 0x800]
movsd xmm2, qword [esi + eax*8]
movapd xmm0, xmm1
addsd xmm0, xmm2
subsd xmm2, xmm1
movsd qword [esi + eax*8], xmm0
movsd qword [esi + eax*8 + 0x800], xmm2
inc eax
cmp eax, ecx
jl 0x1018b240
mov ecx, dword [esp + 0xa4]
cmp eax, dword [esp + 0x18]
jl 0x1018b210
cmp byte [edi + 3], 0
je 0x1018b30b
push 7
push 0
sub esp, 8
lea eax, [esp + 0x40]
test byte [edi + 0x18], 0x10
je 0x1018b2ee
movsd xmm0, qword [edi + 0x40]
add esi, 0xfffff800
movsd qword [esp], xmm0
push eax
lea eax, [edi + 0x10b3]
push eax
push esi
push edi
call fcn.1018bea0
mov edx, dword [esp + 0x40]
xor eax, eax
mov ecx, 0x1f2
add esp, 0x18
lea edi, [edx - 0x7c8]
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
lea eax, [edx + 0x2800]
movsd xmm0, qword [edi + 0x28]
movsd qword [esp], xmm0
push eax
push esi
call fcn.1018e900
mov esi, dword [esp + 0x30]
add esp, 0x10
jmp 0x1018b30b
movsd qword [esp], xmm3
push eax
lea eax, [edi + 0x10b3]
push eax
lea eax, [esi + 0x2800]
push eax
push edi
call fcn.1018bea0
add esp, 0x20
mov eax, dword [edi + 0x18]
xor ecx, ecx
mov edx, dword [esp + 0x24]
and eax, 0xf
movzx eax, byte [eax + 0x1035922c]
mov dword [esp + 0x18], eax
cmp eax, edx
jge 0x1018b3fe
mov ecx, 1
cmp edx, ecx
jle 0x1018b352
mov al, byte [esp + 0x98]
lea ebx, [ebx]
cmp byte [esp + ecx + 0x98], al
jne 0x1018b3fe
inc ecx
cmp ecx, edx
jl 0x1018b340
movups xmm0, xmmword [edi + 8]
mov eax, dword [edi + 0x18]
sub esp, 0x18
movups xmmword [esp + 8], xmm0
xorps xmm0, xmm0
movsd qword [esp], xmm0
push eax
movzx eax, byte [edi + 2]
push eax
push esi
call fcn.1018d000
add esp, 0x24
cmp dword [edi + 0x12b8], 0
jne 0x1018b3b6
movups xmm0, xmmword [edi + 8]
movzx eax, byte [edi + 2]
sub esp, 0x18
mov dword [edi + 0x12b8], 1
movups xmmword [esp + 8], xmm0
xorps xmm0, xmm0
movsd qword [esp], xmm0
push dword [edi + 0x18]
push eax
lea eax, [esi + 0x3000]
push eax
call fcn.1018d000
add esp, 0x24
cmp byte [esp + 0x98], 0
je 0x1018b512
cmp dword [esp + 0x18], 0
jle 0x1018b549
nop
movsd xmm0, qword [edi + 0x28]
lea eax, [esi + 0x3000]
sub esp, 8
movsd qword [esp], xmm0
push eax
push esi
call fcn.1018e4d0
add esp, 0x10
add esi, 0x800
dec dword [esp + 0x18]
jne 0x1018b3d0
jmp 0x1018b549
cmp ecx, edx
jge 0x1018b352
cmp dword [edi + 0x12b8], 0
je 0x1018b435
mov eax, dword [edi + 0x18]
push eax
movzx eax, byte [edi + 2]
push eax
lea eax, [esi + 0x3000]
mov dword [edi + 0x12b8], 0
push eax
call fcn.1018dd90
mov edx, dword [esp + 0x30]
add esp, 0xc
xor ecx, ecx
mov dword [esp + 0x1c], ecx
test edx, edx
jle 0x1018b4e5
mov edx, esi
xorps xmm2, xmm2
mov esi, dword [esp + 0x14]
mov dword [esp + 0x28], edx
mov eax, 1
movapd xmm1, xmm2
shl eax, cl
test esi, eax
jne 0x1018b464
movsd xmm1, qword [edi + 0x28]
movsd xmm0, qword [esp + ecx*8 + 0x68]
ucomisd xmm0, xmm2
lahf
test ah, 0x44
jnp 0x1018b4b0
sub esp, 8
lea eax, [edx + 0x3000]
cmp byte [esp + ecx + 0xa0], 0
movsd qword [esp], xmm1
push eax
push edx
je 0x1018b49f
call fcn.1018e4d0
mov edx, dword [esp + 0x38]
add esp, 0x10
xorps xmm2, xmm2
jmp 0x1018b4c8
call fcn.1018e900
mov edx, dword [esp + 0x38]
add esp, 0x10
xorps xmm2, xmm2
jmp 0x1018b4c8
mov ecx, 0x1fe
movsd qword [edx], xmm1
mov esi, edx
lea edi, [edx + 8]
rep movsd dword es:[edi], dword [esi]
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x14]
mov ecx, dword [esp + 0x1c]
add edx, 0x800
inc ecx
mov dword [esp + 0x28], edx
mov dword [esp + 0x1c], ecx
cmp ecx, dword [esp + 0x24]
jl 0x1018b450
movups xmm0, xmmword [edi + 8]
movzx eax, byte [edi + 2]
sub esp, 0x18
mov edx, dword [esp + 0x38]
movups xmmword [esp + 8], xmm0
movsd xmm0, qword [edi + 0x28]
movsd qword [esp], xmm0
push dword [edi + 0x18]
push eax
push edx
call fcn.1018d000
add esp, 0x24
jmp 0x1018b549
cmp dword [esp + 0x18], 0
jle 0x1018b549
lea esp, [esp]
movsd xmm0, qword [edi + 0x28]
lea eax, [esi + 0x3000]
sub esp, 8
movsd qword [esp], xmm0
push eax
push esi
call fcn.1018e900
add esp, 0x10
add esi, 0x800
dec dword [esp + 0x18]
jne 0x1018b520
mov ecx, dword [esp + 0xa8]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.102d6d23
add esp, 0xa4
ret