Function at 0x101d7d50
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x40
mov eax, dword [ecx + 8]
mov esi, ecx
mov ecx, dword [ecx + 0xc]
mov dword [esp + 0x24], edx
mov edi, 0xfffffff0
mov dword [esp + 0x14], esi
mov dword [esp + 0x20], eax
mov eax, dword [eax + 0x38]
mov dword [esp + 8], ecx
movsx eax, word [eax + ecx*2]
mov ecx, dword [ebp + 0x20]
lea ecx, [eax + ecx*8]
mov edx, ecx
sar edx, 1
cmp dword [ebp + 0x24], 0
setne al
cmp dword [ebp + 0x10], 2
sete bl
and bl, al
mov eax, 0xfffffffc
cmovne eax, edi
mov edi, dword [ebp + 0x10]
add eax, edx
movzx edx, bl
not edx
lea ebx, [edx + edi*2]
mov edx, dword [ebp + 0x14]
imul eax, ebx
mov edi, dword [edx]
add eax, edi
sub edi, ecx
mov ecx, dword [esi]
cdq
add edi, 0xffffffe0
mov dword [esp + 0xc], ecx
mov ecx, dword [esi + 0x10]
mov dword [esp + 0x18], ecx
mov ecx, dword [esi + 0x1c]
mov dword [esp + 4], ecx
mov ecx, dword [esi + 0x24]
mov esi, dword [esp + 0xc]
mov dword [esp + 0x1c], ecx
idiv ebx
mov ecx, dword [ebp + 0x24]
cmp edi, eax
cmovg edi, eax
mov eax, 0x40
cmp edi, 0x41
cmovl eax, edi
mov edi, dword [esp + 8]
xor edx, edx
inc edx
cmp eax, 4
mov ebx, edx
jl 0x101d7e40
mov ecx, eax
shr eax, 3
and ecx, 7
movsx ebx, word [ecx + ecx + 0x10254a54]
mov cl, 0xe
sub cl, al
sar ebx, cl
inc ebx
and ebx, 0xfffffffe
cmp ebx, 0x101
jl 0x101d7e3d
push 0x29d
push 0x10254924
push 0x10254a64
call fcn.10193ce0
xor edx, edx
inc edx
add esp, 0xc
mov ecx, dword [ebp + 0x24]
test ecx, ecx
cmove edx, ebx
cmp edi, dword [esp + 0x18]
cmovl edx, ebx
test esi, esi
mov esi, edx
je 0x101d7ef6
mov edx, dword [esp + 0x14]
mov eax, ecx
push dword [edx + 0x2c]
mov edi, dword [ebp + 0x10]
push edi
push eax
push dword [ebp + 0xc]
push dword [ebp + 8]
mov edi, eax
call fcn.101d9180
add esp, 0x14
mov dword [esp], eax
push dword [esp + 4]
call fcn.101d4650
add esp, 4
cmp esi, 1
mov ecx, eax
mov dword [esp + 0x18], eax
jne 0x101d7f37
mov esi, dword [esp + 8]
test edi, edi
je 0x101d7ffa
xor ebx, ebx
cmp dword [esp], 0x2001
jl 0x101d81a4
mov ecx, dword [esp + 0x14]
xor eax, eax
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
cmp dword [ecx + 0x34], 0
sete cl
jne 0x101d81aa
test edi, edi
jle 0x101d8819
movaps xmm0, xmmword [0x10210920]
mov al, cl
mov ecx, edx
mov edx, edi
movss xmm1, dword [ecx]
xorps xmm1, xmm0
movss dword [ecx], xmm1
add ecx, 4
dec edx
jne 0x101d7edb
mov edx, dword [ebp + 0xc]
mov ebx, eax
jmp 0x101d81aa
push dword [esp + 4]
call fcn.101d4650
add esp, 4
mov edi, dword [ebp + 0x10]
cmp esi, 1
mov dword [esp + 0x18], eax
jne 0x101d7f9a
cmp dword [ebp + 0x24], 0
mov edi, dword [ebp + 0x28]
mov ecx, dword [esp + 0xc]
mov esi, dword [ebp + 0x14]
mov ebx, 0
mov dword [esp], 0
jne 0x101d8340
jmp 0x101d85ca
mov edx, esi
mov esi, dword [esp + 8]
test edi, edi
mov dword [esp + 0x10], edx
je 0x101d8008
mov eax, dword [esp + 0x14]
mov ebx, dword [eax + 0x30]
test ebx, ebx
je 0x101d82d9
mov edi, dword [esp]
mov ecx, 0x7fff
mov eax, 0xffff8001
not ebx
cmp edi, 0x2000
cmovg eax, ecx
mov ecx, edx
cdq
imul edi, ecx
idiv ecx
mov edx, ecx
xor ecx, ecx
add edi, eax
mov eax, edi
sar eax, 0xe
test edi, edi
cmovns ecx, eax
lea eax, [edx - 1]
cmp edx, ecx
cmovle ecx, eax
shr ebx, 0x1f
add ebx, ecx
jmp 0x101d82e8
mov ecx, esi
cmp edi, 3
mov dword [esp + 0x10], esi
jl 0x101d827b
cmp dword [ebp + 0x24], 0
je 0x101d827b
mov edi, ecx
shr edi, 0x1f
add edi, ecx
sar edi, 1
lea eax, [edi + 1]
lea esi, [eax + eax*2]
mov dword [esp], eax
lea eax, [esi + edi]
mov dword [esp + 0x14], eax
push eax
push dword [esp + 8]
call fcn.101d2740
add esp, 8
mov ebx, eax
mov ecx, esi
cmp eax, esi
jge 0x101d8385
mov edx, 0x55555556
mov eax, ebx
imul edx
mov ebx, edx
shr ebx, 0x1f
add ebx, edx
jmp 0x101d838c
mov esi, dword [ebp + 0x14]
mov edi, dword [ebp + 0x10]
mov ebx, dword [esp]
jmp 0x101d8640
mov edi, dword [esp]
imul edi, edx
lea esi, [edi + 0x2000]
mov eax, esi
sar eax, 0xe
cmp eax, edx
mov dword [esp], eax
jge 0x101d83d6
cmp edi, 0x2000
mov edi, dword [ebp + 0x10]
jl 0x101d83de
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0x38], 0
je 0x101d83de
and esi, 0xffffc000
xor edx, edx
mov eax, esi
div dword [esp + 0x10]
mov edx, 0x40000000
movsx ecx, ax
shl eax, 0x10
sub edx, eax
sar eax, 0xd
imul eax, ecx
add eax, 0x8000
sar eax, 0x10
imul ecx, eax, 0xfffffd8e
add ecx, 0x4000
sar ecx, 0xf
add ecx, 0x2055
imul ecx, eax
add ecx, 0x4000
shr ecx, 0xf
add ecx, 0xffffe21d
movsx ecx, cx
imul ecx, eax
add ecx, 0x4000
shr ecx, 0xf
sub ecx, eax
mov eax, edx
sar edx, 0xd
sar eax, 0x10
add ecx, 0xffff8000
imul edx, eax
movsx esi, cx
mov cl, 0xe
mov ch, 0xe
add edx, 0x8000
sar edx, 0x10
imul eax, edx, 0xfffffd8e
add eax, 0x4000
sar eax, 0xf
add eax, 0x2055
imul eax, edx
add eax, 0x4000
shr eax, 0xf
add eax, 0xffffe21d
cwde
imul eax, edx
add eax, 0x4000
shr eax, 0xf
sub eax, edx
add eax, 0xffff8000
movsx edi, ax
bsr eax, esi
mov dword [esp + 0x14], eax
bsr edx, edi
sub cl, byte [esp + 0x14]
sub ch, dl
sub edx, dword [esp + 0x14]
shl esi, cl
mov cl, ch
shl edx, 0xb
shl edi, cl
movsx eax, di
mov edi, dword [ebp + 0x10]
imul ecx, eax, 0xfffff5db
add ecx, 0x4000
sar ecx, 0xf
add ecx, 0x1efc
imul ecx, eax
movsx eax, si
imul esi, eax, 0xfffff5db
add ecx, 0x4000
add esi, 0x4000
shr ecx, 0xf
sar esi, 0xf
add esi, 0x1efc
imul esi, eax
xor eax, eax
add esi, 0x4000
shr esi, 0xf
sub edx, esi
add edx, ecx
mov ecx, edi
shl ecx, 7
add ecx, 0xffffff80
movsx esi, cx
movsx ecx, dx
mov edx, dword [ebp + 0x14]
imul ecx, esi
mov esi, dword [esp + 8]
add ecx, 0x4000
sar ecx, 0xf
mov edx, dword [edx]
cmp ecx, edx
jg 0x101d83e5
mov ebx, dword [esp]
neg edx
cmp ecx, edx
cmovl ebx, eax
jmp 0x101d83e5
mov edx, dword [ebp + 0xc]
mov edi, dword [ebp + 0x10]
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
movss xmm2, dword [ecx + esi*4]
add esi, dword [eax + 8]
movaps xmm0, xmm2
movss xmm3, dword [ecx + esi*4]
mulss xmm0, xmm2
addss xmm0, dword [0x10254920]
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm1, xmm0
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x101d81ef
sqrtsd xmm0, xmm0
jmp 0x101d8224
sub esp, 8
movsd qword [esp], xmm0
movss dword [esp + 0x10], xmm2
movss dword [esp + 0x18], xmm3
call fcn.101f2770
movss xmm3, dword [esp + 0x18]
movss xmm2, dword [esp + 0x10]
mov edx, dword [ebp + 0xc]
add esp, 8
fstp qword [esp + 0x28]
movsd xmm0, qword [esp + 0x28]
mov ecx, dword [esp + 0xc]
mov esi, dword [ebp + 0x14]
test edi, edi
mov dword [esp], ebx
jle 0x101d833d
cvtsd2ss xmm0, xmm0
mov ecx, dword [ebp + 8]
xor eax, eax
addss xmm0, dword [0x10254920]
divss xmm2, xmm0
divss xmm3, xmm0
movss xmm0, dword [ecx + eax*4]
movss xmm1, dword [edx + eax*4]
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm1, xmm0
movss dword [ecx + eax*4], xmm1
inc eax
cmp edi, eax
jne 0x101d824f
mov edi, dword [ebp + 0x28]
mov ecx, dword [esp + 0xc]
jmp 0x101d8340
cmp dword [ebp + 0x1c], 1
jg 0x101d83bf
cmp dword [ebp + 0x24], 0
jne 0x101d83bf
mov esi, ecx
sar esi, 1
lea ebx, [esi + 1]
mov edi, ebx
imul edi, ebx
push edi
push dword [esp + 8]
call fcn.101d2740
add esp, 8
imul ebx, esi
sar ebx, 1
cmp eax, ebx
jge 0x101d85e5
lea eax, [eax*8 + 1]
push eax
call fcn.101de2d0
add esp, 4
mov esi, eax
dec esi
shr esi, 1
lea ebx, [esi + 1]
mov eax, ebx
imul eax, esi
shr eax, 1
jmp 0x101d861c
mov ebx, dword [esp]
imul ebx, edx
add ebx, 0x2000
sar ebx, 0xe
mov edi, dword [ebp + 0x10]
cmp edi, 2
jle 0x101d83ef
mov eax, edx
shr eax, 0x1f
add eax, edx
sar eax, 1
mov esi, eax
lea edx, [eax + eax*2 + 3]
lea ecx, [eax + eax*2]
not esi
sub edx, eax
lea esi, [esi + ecx + 3]
lea ecx, [eax + ecx + 3]
add edx, ebx
add esi, ebx
cmp ebx, eax
lea eax, [ebx + ebx*2 + 3]
cmovg eax, edx
lea edx, [ebx + ebx*2]
cmovg edx, esi
mov esi, dword [esp + 8]
push ecx
push eax
push edx
push dword [esp + 0x10]
call fcn.101dde30
add esp, 0x10
jmp 0x101d8400
mov edi, dword [ebp + 0x28]
xor ebx, ebx
cmp dword [esi], 0x11
mov eax, 0
jl 0x101d843a
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x20], 0x11
mov eax, 0
jl 0x101d843a
test ecx, ecx
je 0x101d842c
push 2
push dword [esp + 4]
push dword [esp + 0xc]
call fcn.101ddf30
add esp, 0xc
mov eax, dword [esp]
jmp 0x101d843a
mov eax, dword [esp]
add eax, eax
sub ebx, eax
mov eax, ecx
mov edx, ecx
mov ecx, edi
lea esi, [ebx + ebx*2 + 3]
not ecx
sub eax, edi
add ecx, edx
add eax, ebx
lea edx, [ebx + ebx*2]
add ecx, ebx
cmp ebx, edi
cmovg esi, eax
cmovg edx, ecx
push dword [esp + 0x14]
push esi
push edx
push dword [esp + 0x10]
call fcn.101d27c0
jmp 0x101d8464
lea eax, [ecx + 1]
push eax
push dword [esp + 8]
call fcn.101d2ab0
add esp, 8
mov ebx, eax
jmp 0x101d846a
mov ebx, dword [esp]
mov edi, dword [ebp + 0x10]
jmp 0x101d83e1
mov ebx, dword [esp]
mov esi, dword [esp + 8]
cmp dword [ebp + 0x1c], 2
jl 0x101d8406
mov edx, dword [esp + 0x10]
lea eax, [edx + 1]
push eax
push ebx
push dword [esp + 0xc]
call fcn.101de020
add esp, 0xc
mov ecx, dword [esp + 0xc]
jmp 0x101d8472
mov edi, dword [esp + 0x10]
lea edx, [ebx + 1]
mov ecx, edi
sub edi, ebx
sar ecx, 1
lea esi, [edi + 1]
lea eax, [ecx + 1]
imul eax, eax
cmp ebx, ecx
mov ecx, esi
cmovle ecx, edx
jg 0x101d844a
imul edx, ebx
sar edx, 1
jmp 0x101d8456
push 2
push dword [esp + 8]
call fcn.101d28a0
add esp, 8
mov ecx, dword [esp + 0x14]
cmp dword [ecx + 0x34], 0
cmove ebx, eax
jmp 0x101d85ca
add edi, 2
mov edx, eax
imul esi, edi
sar esi, 1
sub edx, esi
add ecx, edx
push eax
push ecx
push edx
push dword [esp + 0x10]
call fcn.101dde30
add esp, 0x10
mov edi, dword [ebp + 0x10]
mov ecx, dword [esp + 0xc]
mov esi, dword [esp + 8]
test ebx, ebx
jns 0x101d8491
push 0x346
push 0x10254924
push str.assertion_failed:_itheta_0
call fcn.10193ce0
mov ecx, dword [esp + 0x18]
add esp, 0xc
shl ebx, 0xe
xor edx, edx
mov eax, ebx
div dword [esp + 0x10]
cmp dword [ebp + 0x24], 0
je 0x101d84f4
test ecx, ecx
je 0x101d84f4
cmp dword [esp + 0x10], ebx
jbe 0x101d84fe
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x20]
movss xmm2, dword [ecx + esi*4]
add esi, dword [eax + 8]
movaps xmm0, xmm2
movss xmm3, dword [ecx + esi*4]
mulss xmm0, xmm2
addss xmm0, dword [0x10254920]
movaps xmm1, xmm3
mulss xmm1, xmm3
addss xmm1, xmm0
xorps xmm0, xmm0
cvtss2sd xmm0, xmm1
xorps xmm1, xmm1
ucomisd xmm0, xmm1
jb 0x101d854c
sqrtsd xmm0, xmm0
jmp 0x101d857e
mov esi, dword [ebp + 0x14]
mov ebx, eax
jmp 0x101d8640
test edi, edi
mov ebx, eax
jle 0x101d863d
movss xmm0, dword [0x10210aac]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
xor eax, eax
movss xmm1, dword [edx + eax*4]
movss xmm2, dword [ecx + eax*4]
mulss xmm1, xmm0
mulss xmm2, xmm0
movaps xmm3, xmm1
addss xmm3, xmm2
subss xmm2, xmm1
movss dword [edx + eax*4], xmm3
movss dword [ecx + eax*4], xmm2
inc eax
cmp edi, eax
jne 0x101d851b
jmp 0x101d8640
sub esp, 8
movsd qword [esp], xmm0
movss dword [esp + 0x14], xmm2
movss dword [esp + 0x10], xmm3
call fcn.101f2770
movss xmm3, dword [esp + 0x10]
movss xmm2, dword [esp + 0x14]
add esp, 8
fstp qword [esp + 0x30]
movsd xmm0, qword [esp + 0x30]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
mov esi, dword [ebp + 0x14]
test edi, edi
jle 0x101d85c5
cvtsd2ss xmm0, xmm0
xor ebx, ebx
xor eax, eax
addss xmm0, dword [0x10254920]
divss xmm2, xmm0
divss xmm3, xmm0
movss xmm0, dword [edx + eax*4]
movss xmm1, dword [ecx + eax*4]
mulss xmm0, xmm2
mulss xmm1, xmm3
addss xmm1, xmm0
movss dword [edx + eax*4], xmm1
inc eax
cmp edi, eax
jne 0x101d85a3
jmp 0x101d85c7
xor ebx, ebx
mov edi, dword [ebp + 0x28]
push dword [esp + 4]
call fcn.101d4650
add esp, 4
sub eax, dword [esp + 0x18]
mov dword [esp + 4], eax
sub dword [esi], eax
jmp 0x101d8665
mov ecx, dword [esp + 0x10]
not eax
add eax, edi
lea eax, [eax*8 + 1]
lea ebx, [ecx + 1]
lea esi, [ecx + ecx + 2]
push eax
call fcn.101de2d0
add esp, 4
mov ecx, dword [esp + 0x10]
sub esi, eax
mov eax, edi
shr esi, 1
sub ebx, esi
sub ecx, esi
add ecx, 2
imul ecx, ebx
sar ecx, 1
sub eax, ecx
add ebx, eax
push edi
push ebx
push eax
push dword [esp + 0x10]
call fcn.101d27c0
add esp, 0x10
shl esi, 0xe
xor edx, edx
mov edi, dword [ebp + 0x10]
mov eax, esi
div dword [esp + 0x10]
mov ebx, eax
mov esi, dword [ebp + 0x14]
push dword [esp + 4]
call fcn.101d4650
add esp, 4
sub eax, dword [esp + 0x18]
sub dword [esi], eax
cmp ebx, 0x4000
mov dword [esp + 4], eax
je 0x101d8686
test ebx, ebx
jne 0x101d86af
mov edi, dword [ebp + 0x28]
xor esi, esi
mov ecx, dword [ebp + 0x18]
mov edx, ebx
xor ebx, ebx
xor eax, eax
dec esi
shl esi, cl
mov ecx, 0xffffc000
not esi
and dword [edi], esi
mov esi, 0x7fff
jmp 0x101d87f8
mov ecx, dword [ebp + 0x18]
xor edx, edx
mov eax, 0x7fff
mov ebx, 0x4000
xor esi, esi
dec edx
shl edx, cl
not edx
shl edx, cl
mov ecx, dword [ebp + 0x28]
and dword [ecx], edx
xor edx, edx
mov ecx, 0x4000
jmp 0x101d87f8
mov ecx, ebx
movsx edx, bx
mov dword [esp], ebx
mov ebx, 0x40000000
shl ecx, 0x10
sub ebx, ecx
sar ecx, 0xd
imul ecx, edx
add ecx, 0x8000
sar ecx, 0x10
imul edx, ecx, 0xfffffd8e
add edx, 0x4000
sar edx, 0xf
add edx, 0x2055
imul edx, ecx
add edx, 0x4000
shr edx, 0xf
add edx, 0xffffe21d
movsx edx, dx
imul edx, ecx
add edx, 0x4000
shr edx, 0xf
sub edx, ecx
mov ecx, ebx
sar ebx, 0xd
sar ecx, 0x10
add edx, 0xffff8000
imul ebx, ecx
movsx eax, dx
add ebx, 0x8000
bsr edx, eax
mov dword [esp + 0xc], eax
sar ebx, 0x10
mov esi, edx
imul ecx, ebx, 0xfffffd8e
add ecx, 0x4000
sar ecx, 0xf
add ecx, 0x2055
imul ecx, ebx
add ecx, 0x4000
shr ecx, 0xf
add ecx, 0xffffe21d
movsx ecx, cx
imul ecx, ebx
add ecx, 0x4000
shr ecx, 0xf
sub ecx, ebx
add ecx, 0xffff8000
movsx ebx, cx
mov cl, 0xe
mov ch, 0xe
sub cl, dl
bsr edx, ebx
sub ch, dl
sub edx, esi
mov esi, eax
mov eax, ebx
shl esi, cl
mov cl, ch
shl edx, 0xb
shl ebx, cl
movsx ecx, bx
imul ebx, ecx, 0xfffff5db
add ebx, 0x4000
sar ebx, 0xf
add ebx, 0x1efc
imul ebx, ecx
movsx ecx, si
mov esi, edi
imul edi, ecx, 0xfffff5db
add ebx, 0x4000
shl esi, 7
add edi, 0x4000
shr ebx, 0xf
add esi, 0xffffff80
sar edi, 0xf
add edi, 0x1efc
imul edi, ecx
add edi, 0x4000
shr edi, 0xf
sub edx, edi
movsx edi, si
mov esi, dword [esp + 0xc]
add edx, ebx
mov ebx, dword [esp]
movsx ecx, dx
xor edx, edx
imul ecx, edi
add ecx, 0x4000
sar ecx, 0xf
mov edi, dword [esp + 0x24]
mov dword [edi], edx
mov dword [edi + 4], esi
mov dword [edi + 8], eax
mov dword [edi + 0xc], ecx
mov ecx, dword [esp + 4]
mov dword [edi + 0x10], ebx
mov dword [edi + 0x14], ecx
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
xor ebx, ebx
inc ebx
jmp 0x101d81aa