Function at 0x10168290
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x10321879
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x1043900c]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, edx
mov dword [ebp - 0x30], ecx
mov eax, dword fs:[0x2c]
mov esi, dword [0x104c14e0]
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x34], ebx
mov edx, dword [eax + esi*4]
mov eax, dword [0x106122b0]
cmp eax, dword [edx + 4]
jg 0x101684ba
mov ecx, dword [0x106122b8]
mov eax, dword [ecx]
mov eax, dword [eax + 0x30]
mov dword [ebp - 0x34], eax
call dword [ebp - 0x34]
mov eax, dword [ebp - 0x30]
movss xmm1, dword [0x1041f1d4]
fstp dword [ebp - 0x34]
movss xmm3, dword [ebp - 0x34]
movss xmm2, dword [eax + 8]
comiss xmm1, xmm2
jbe 0x101683e7
movss xmm0, dword [edi + 8]
comiss xmm0, xmm2
jbe 0x101683e7
comiss xmm1, xmm0
jbe 0x101683e7
movss xmm1, dword [eax + 4]
movss xmm0, dword [eax]
mulss xmm0, xmm0
mov dword [ebp - 0x44], 0
mulss xmm1, xmm1
addss xmm0, xmm1
movss dword [ebp - 0x30], xmm0
sqrtss xmm0, dword [ebp - 0x30]
movss dword [ebp - 0x44], xmm0
movss xmm1, dword [edi + 4]
movss xmm0, dword [edi]
movss xmm2, dword [ebp - 0x44]
mulss xmm0, xmm0
mov dword [ebp - 0x20], 0
mulss xmm1, xmm1
addss xmm0, xmm1
movss dword [ebp - 0x30], xmm0
sqrtss xmm0, dword [ebp - 0x30]
movss dword [ebp - 0x20], xmm0
movss xmm0, dword [ebp - 0x20]
comiss xmm0, xmm2
jb 0x101683e7
mov eax, dword [0x1060b290]
movaps xmm1, xmm3
movss xmm0, dword [edi + 8]
push ecx
mulss xmm1, dword [eax + 0x20]
subss xmm0, xmm1
movss dword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_roundf]
movss xmm0, dword [ebx + 8]
fstp dword [ebp - 0x30]
movss dword [esp], xmm0
call dword [sym.imp.api_ms_win_crt_math_l1_1_0.dll_roundf]
movss xmm0, dword [ebp - 0x30]
add esp, 4
fstp dword [ebp - 0x2c]
ucomiss xmm0, dword [ebp - 0x2c]
lahf
test ah, 0x44
jnp 0x10168498
movss xmm3, dword [ebp - 0x34]
movss xmm1, dword [edi + 4]
movss xmm0, dword [edi]
mulss xmm0, xmm0
mov dword [ebp - 0x20], 0
mulss xmm1, xmm1
addss xmm0, xmm1
movss dword [ebp - 0x2c], xmm0
sqrtss xmm0, dword [ebp - 0x2c]
movss dword [ebp - 0x20], xmm0
movss xmm1, dword [ebx + 4]
movss xmm0, dword [ebx]
movss xmm2, dword [ebp - 0x20]
mulss xmm0, xmm0
mov dword [ebp - 0x44], 0
mulss xmm1, xmm1
addss xmm0, xmm1
movss dword [ebp - 0x2c], xmm0
sqrtss xmm0, dword [ebp - 0x2c]
movss dword [ebp - 0x44], xmm0
movss xmm0, dword [ebp - 0x44]
comiss xmm0, xmm2
jb 0x1016849c
mov eax, dword [0x1060b290]
mulss xmm3, dword [eax + 0x20]
mulss xmm3, dword [0x1041f188]
comiss xmm3, dword [edi + 8]
movss dword [ebp - 0x2c], xmm3
jbe 0x1016849c
fld dword [ebx + 8]
push ecx
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
fstp dword [ebp - 0x30]
fld dword [ebp - 0x2c]
fstp dword [esp]
call sub.api_ms_win_crt_math_l1_1_0.dll_roundf
movss xmm0, dword [ebp - 0x30]
add esp, 4
fstp dword [ebp - 0x2c]
ucomiss xmm0, dword [ebp - 0x2c]
lahf
test ah, 0x44
jp 0x1016849c
mov al, 1
jmp 0x1016849e
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.102bb91c
mov esp, ebp
pop ebp
ret
push 0x106122b0
call fcn.102bba07
add esp, 4
cmp dword [0x106122b0], 0xffffffff
jne 0x101682e6
mov dword [ebp - 4], 0
cmp byte [0x104b1880], 0
jne 0x1016854c
mov byte [0x104b1880], 1
xor esi, esi
jmp 0x101684f0
xor edx, edx
mov ebx, esi
xor edx, dword [0x104b1894]
xor ebx, dword [0x104b1890]
xor edx, 0xd28f2c5
xor ebx, 0x1de26cd5
mov ecx, edx
mov eax, ebx
shld ecx, eax, 0xd
xor edx, ecx
shl eax, 0xd
xor ebx, eax
mov ecx, edx
mov eax, ebx
shrd eax, ecx, 7
shr ecx, 7
xor ebx, eax
xor edx, ecx
mov ecx, ebx
shld edx, ecx, 0x11
shl ecx, 0x11
xor cl, byte [esi + 0x104b1881]
xor cl, bl
mov byte [esi + 0x104b1881], cl
inc esi
cmp esi, 0xb
jb 0x101684f0
mov ebx, dword [ebp - 0x34]
jmp 0x1016854c
push ecx
push 0x104b188b
push 0x104b1881
lea ecx, [ebp - 0x28]
call fcn.1001a620
mov byte [ebp - 4], 1
lea edx, [ebp - 0x28]
mov ecx, dword [0x1060b27c]
cmp dword [ebp - 0x14], 0x10
cmovae edx, dword [ebp - 0x28]
mov eax, dword [ecx]
push edx
mov eax, dword [eax + 0x40]
call eax
lea ecx, [ebp - 0x28]
mov dword [0x106122b8], eax
call fcn.10019dd0
push 0x106122b0
mov dword [ebp - 4], 0xffffffff
call fcn.102bb9b6
add esp, 4
jmp 0x101682e6