Function at 0x1017313a
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x34
push esi
mov esi, dword [ebp + 8]
push edi
mov edi, dword [esi + 0x120]
mov eax, dword [edi + 0x14b18]
mov dword [ebp - 0x28], eax
mov eax, dword [edi + 0x14b1c]
mov dword [ebp - 0x2c], eax
mov eax, 0xa
sub eax, dword [esi + 0xa4]
lea eax, [eax + eax*4]
add eax, eax
sub eax, dword [esi + 0x2c]
mov dword [ebp - 0x1c], eax
call fcn.10173860
movd xmm0, dword [edi + 0x38]
cvtdq2pd xmm0, xmm0
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x34], 0x2030501
mov word [ebp - 0x30], 4
mov byte [ebp - 0x2e], 3
movsd xmm1, qword [0x10201a58]
divsd xmm0, qword [0x10200428]
addsd xmm0, qword [0x102de5f0]
comisd xmm0, xmm1
ja 0x10172fbc
movaps xmm1, xmm0
mov edx, dword [esi + 0x48]
mov ecx, dword [edi + 0x6c]
mov esi, dword [esi + 0x4c]
cvttsd2si eax, xmm1
push ebx
xor bh, bh
mov dword [ebp - 0x14], 0
xor bl, bl
mov dword [ebp - 0xc], 0
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x18], edx
mov dword [ebp - 0x24], eax
mov al, byte [edi + 0x20]
mov byte [ebp - 2], al
mov al, byte [edi + 0xd4]
mov byte [ebp - 1], al
test ecx, ecx
je 0x10173026
cmp ecx, 3
je 0x10173021
mov eax, dword [edi + 0x14]
shl eax, 4
add eax, dword [edi + 0x74]
mov eax, dword [eax*4 + 0x102b1d88]
mov dword [ebp - 8], eax
cmp ecx, 7
jb 0x1017302c
mov byte [ebp + 0xb], bl
mov dword [ebp - 8], eax
jmp 0x10173033
mov eax, dword [edi + 0x70]
jmp 0x10173029
mov eax, dword [edi + 0x7c]
mov dword [ebp - 8], eax
mov al, byte [ebp + ecx - 0x34]
mov byte [ebp + 0xb], al
cmp dword [edi + 0x84], 0
je 0x10173074
mov ecx, dword [edi + 0x14eb8]
cmp ecx, 0x1fe
jle 0x10173056
mov eax, 0x1fe
or eax, 0x2c00
jmp 0x1017306e
cmp ecx, 0xfffffe02
jge 0x1017310e
mov eax, 0xfe02
neg eax
or eax, 0x2e00
movzx eax, ax
mov dword [ebp - 0xc], eax
cmp dword [edi + 0x88], 0
je 0x101730c0
movsd xmm0, qword [0x102de5f8]
movsd xmm1, qword [0x102b00a8]
call fcn.1012bd40
movss xmm1, dword [edi + 0x14eb4]
cvtps2pd xmm1, xmm1
divsd xmm1, qword [0x102040e0]
mulsd xmm0, xmm1
addsd xmm0, qword [0x102de5f0]
cvttsd2si eax, xmm0
cdq
xor eax, edx
sub eax, edx
mov edx, dword [ebp - 0x18]
mov dword [ebp - 0x14], eax
cmp edx, 0xffffffff
je 0x101730d3
test esi, esi
lea eax, [edx - 1]
setg bl
cmp esi, eax
jge 0x101730d3
mov bh, 1
mov edx, dword [ebp - 0x1c]
add bl, bl
add bl, bh
mov eax, 0x10
mov bh, byte [ebp - 1]
mov ecx, 0x30
shl bl, 6
cmp dword [edi + 0x64], 0
cmovne eax, ecx
add bl, al
xor eax, eax
add bl, bh
test edx, edx
cmovs edx, eax
mov eax, dword [edi + 0xb8]
cmp eax, 4
ja case.0x10173107.4
jmp dword [eax*4 + 0x101732f4]
movzx eax, cx
test ecx, ecx
js 0x10173067
or eax, 0x2c00
jmp 0x1017306e
xor al, al
jmp 0x1017313c
mov al, 1
jmp 0x1017313c
mov al, 2
jmp 0x1017313c
cmp dword [edi + 0x54], 0
setne al
add al, 3
jmp 0x1017313c
mov al, 7
mov esi, dword [edi + 0x40]
cmp esi, 0x7d00
jg 0x1017314b
xor cl, cl
jmp 0x10173161
cmp esi, 0xbb80
jne 0x10173157
mov cl, 4
jmp 0x10173161
setg cl
lea ecx, [ecx*4 + 2]
cmp dword [edi + 0xbc], 3
je 0x101731af
cmp dword [edi + 0xbc], 2
je 0x101731af
cmp dword [edi + 0x38], 0xffffffff
jne 0x1017317f
cmp dword [edi + 0x3c], 0xffffffff
je 0x101731af
cmp dword [edi + 0x94], 0
je 0x10173191
cmp dword [edi + 0x7c], 0x140
jl 0x101731af
cmp dword [edi + 0xe0], 0
jne 0x101731af
cmp dword [edi + 0xd8], 0
jne 0x101731af
test bh, bh
je 0x101731af
cmp esi, 0x7d00
jg 0x101731b6
mov dword [ebp - 0x10], 1
add cl, byte [ebp - 0x10]
movzx esi, word [edi + 0x14efc]
shl cl, 3
add cl, al
mov eax, edx
shl cl, 2
add cl, byte [ebp - 2]
shr eax, 0x18
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x10]
push 9
push dword [ebp - 0x20]
mov byte [ecx], al
mov eax, edx
shr eax, 0x10
mov byte [ecx + 1], al
mov eax, edx
shr eax, 8
mov byte [ecx + 2], al
lea eax, [ecx + 4]
push eax
mov byte [ecx + 3], dl
call fcn.10132540
mov edx, dword [ebp + 0x10]
add esp, 0xc
mov al, byte [ebp + 0xb]
mov ecx, dword [ebp - 0x14]
mov byte [edx + 0xd], al
mov eax, dword [ebp - 0x24]
mov byte [edx + 0xe], al
mov eax, ecx
shr eax, 0x18
mov byte [edx + 0xf], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 0x10], al
mov eax, ecx
shr eax, 8
mov byte [edx + 0x11], al
mov eax, dword [ebp - 0xc]
mov byte [edx + 0x12], cl
movzx ecx, ax
mov byte [edx + 0x14], cl
mov eax, ecx
mov ecx, dword [ebp - 8]
shr eax, 8
mov byte [edx + 0x13], al
mov word [edx + 0x15], 0
mov byte [edx + 0x17], bl
mov ebx, 0xff
cmp ecx, ebx
movzx eax, cl
mov ecx, dword [ebp - 0x28]
cmovge eax, ebx
mov ebx, dword [ebp - 0x2c]
mov byte [edx + 0x18], al
mov eax, ecx
sar eax, 4
mov byte [edx + 0x19], al
mov eax, ebx
sar eax, 8
shl cl, 4
add al, cl
mov byte [edx + 0x1b], bl
mov byte [edx + 0x1a], al
mov eax, dword [ebp - 0x1c]
mov byte [edx + 0x1c], al
mov byte [edx + 0x1d], 0
mov ecx, dword [edi + 0x68]
mov eax, ecx
sar eax, 8
mov byte [edx + 0x1e], al
mov byte [edx + 0x1f], cl
mov ecx, dword [ebp + 0xc]
mov eax, ecx
shr eax, 0x18
mov byte [edx + 0x20], al
mov eax, ecx
shr eax, 0x10
mov byte [edx + 0x21], al
mov eax, ecx
mov byte [edx + 0x23], cl
mov ecx, esi
mov esi, dword [ebp + 0x10]
shr eax, 8
mov byte [edx + 0x22], al
mov eax, ecx
shr eax, 8
mov byte [edx + 0x25], cl
mov ecx, dword [ebp + 0x14]
mov byte [edx + 0x24], al
xor edx, edx
pop ebx
movzx eax, byte [esi + edx]
inc edx
xor eax, ecx
shr cx, 8
movzx eax, al
xor cx, word [eax*4 + 0x102afc80]
movzx ecx, cx
cmp edx, 0x26
jl 0x101732c0
mov eax, ecx
mov byte [esi + 0x27], cl
shr eax, 8
mov byte [esi + 0x26], al
mov eax, 0x28
pop edi
pop esi
mov esp, ebp
pop ebp
ret