Function at 0x10039760
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x118
cmp byte [0x101d1169], 0
push esi
push edi
je 0x10039c41
cmp byte [0x101d1168], 0
je 0x10039c41
mov ecx, dword [0x101d11a4]
vxorps xmm0, xmm0, xmm0
vmovss dword [ebp - 0x3c], xmm0
vmovss xmm0, dword [0x1015d17c]
mov eax, dword [ecx]
push ecx
mov dword [ebp - 0x24], 3
vmovss dword [esp], xmm0
mov eax, dword [eax + 0x1b0]
call eax
lea eax, [ebp - 0x28]
mov dword [ebp - 0x28], 6
push eax
mov ecx, 0x1015dff8
call fcn.100d1c60
mov edi, dword [eax + 4]
mov esi, dword [eax]
cmp esi, edi
je 0x100398e2
nop dword [eax + eax]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x114]
mov dword [ebp - 0xc], 0
mov ecx, 8
mov dword [ebp - 0x10], 0
mov dword [ebp - 8], 0
vxorps xmm0, xmm0, xmm0
nop dword [eax + eax]
lea eax, [eax + 0xc]
vmovss dword [eax - 8], xmm0
vmovss dword [eax - 0xc], xmm0
vmovss dword [eax - 0x10], xmm0
sub ecx, 1
jne 0x10039820
mov ecx, dword [esi]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 4]
push eax
lea edx, [ebp - 0x118]
call fcn.10037bb0
add esp, 0x10
test al, al
je 0x100398d7
mov ecx, dword [esi]
lea eax, [ebp - 0x54]
push eax
call fcn.100375d0
lea edx, [ebp - 0x3c]
mov ecx, eax
call fcn.10037990
test al, al
je 0x100398d7
xor eax, eax
mov dword [ebp - 0x30], 0xd540d4b
mov word [ebp - 0x2c], ax
xor ecx, ecx
mov byte [ebp - 0x2a], 1
nop word [eax + eax]
lea eax, [ecx + 0xd23]
xor word [ebp + ecx*2 - 0x30], ax
inc ecx
cmp ecx, 2
jb 0x10039890
lea eax, [ebp - 0x30]
mov byte [ebp - 0x2a], 0
push eax
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0xc]
push 0x1015d1a0
push eax
vcvttss2si eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x1015dfac
call fcn.100d07b0
add esp, 0x1c
add esi, 4
cmp esi, edi
jne 0x100397f0
mov ecx, dword [0x101632c4]
mov esi, 1
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
call eax
cmp eax, esi
jle 0x10039a53
nop dword [eax]
mov ecx, dword [0x101632c4]
push esi
mov eax, dword [ecx]
mov eax, dword [eax + 0xc]
call eax
mov edi, eax
test edi, edi
je case.0x10039943.218
mov edx, dword [edi + 8]
lea ecx, [edi + 8]
mov edx, dword [edx + 8]
call edx
test eax, eax
je case.0x10039943.218
mov eax, dword [eax + 0x14]
add eax, 0xffffff27
cmp eax, 0x3e
ja case.0x10039943.218
movzx eax, byte [eax + 0x10039c54]
jmp dword [eax*4 + 0x10039c4c]
mov dword [ebp - 0x14], 0
lea eax, [ebp - 0xb4]
mov dword [ebp - 8], 0
mov ecx, 8
mov dword [ebp - 4], 0
mov dword [ebp - 0x10], 0
vxorps xmm0, xmm0, xmm0
nop word [eax + eax]
lea eax, [eax + 0xc]
vmovss dword [eax - 8], xmm0
vmovss dword [eax - 0xc], xmm0
vmovss dword [eax - 0x10], xmm0
sub ecx, 1
jne 0x10039980
lea eax, [ebp - 0x10]
mov ecx, edi
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 0x14]
push eax
lea edx, [ebp - 0xb8]
call fcn.10037bb0
add esp, 0x10
test al, al
je case.0x10039943.218
lea eax, [ebp - 0x48]
mov ecx, edi
push eax
call fcn.100375d0
lea edx, [ebp - 0x3c]
mov ecx, eax
call fcn.10037990
test al, al
je case.0x10039943.218
mov dword [ebp - 0x1e], 0xd050d78
xor ecx, ecx
mov dword [ebp - 0x1a], 0xd78
mov byte [ebp - 0x16], 1
nop dword [eax]
lea eax, [ecx + 0xd23]
xor word [ebp + ecx*2 - 0x1e], ax
inc ecx
cmp ecx, 3
jb 0x100399f0
lea eax, [ebp - 0x1e]
mov byte [ebp - 0x16], 0
push eax
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 1
push eax
lea eax, [ebp - 0xc]
mov dword [ebp - 0xc], 0xffffffff
push eax
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 8]
push eax
vcvttss2si eax, dword [ebp - 0x3c]
push eax
lea eax, [ebp - 0x24]
push eax
push 0x1015dfac
call fcn.100d07b0
add esp, 0x1c
mov ecx, dword [0x101632c4]
inc esi
mov eax, dword [ecx]
mov eax, dword [eax + 0x18]
call eax
cmp esi, eax
jl 0x10039900
lea eax, [ebp - 0x14]
mov dword [ebp - 0x14], 7
push eax
mov ecx, 0x1015dff8
call fcn.100d1c60
mov edi, dword [eax + 4]
mov esi, dword [eax]
cmp esi, edi
je 0x10039c23
nop word [eax + eax]
mov dword [ebp - 0x28], 0
lea eax, [ebp - 0xb4]
mov dword [ebp - 0x10], 0
mov ecx, 8
mov dword [ebp - 4], 0
mov dword [ebp - 8], 0
vxorps xmm0, xmm0, xmm0
nop dword [eax + eax]
lea eax, [eax + 0xc]
vmovss dword [eax - 8], xmm0
vmovss dword [eax - 0xc], xmm0
vmovss dword [eax - 0x10], xmm0
sub ecx, 1
jne 0x10039ab0
mov ecx, dword [esi]
lea eax, [ebp - 8]
push eax
lea eax, [ebp - 4]
push eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0x28]
push eax
lea edx, [ebp - 0xb8]
call fcn.10037bb0
add esp, 0x10
test al, al
je 0x10039c18
mov ecx, dword [esi]
lea eax, [ebp - 0x48]
push eax
call fcn.100375d0
vmovss xmm4, dword [eax + 4]
vmovss xmm3, dword [eax]
vmulss xmm0, xmm4, dword [0x101d171c]
vmulss xmm1, xmm3, dword [0x101d1718]
vmovss xmm5, dword [eax + 8]
vaddss xmm1, xmm1, xmm0
vmulss xmm0, xmm5, dword [0x101d1720]
vaddss xmm0, xmm1, xmm0
vaddss xmm2, xmm0, dword [0x101d1724]
vcvtss2sd xmm0, xmm2, xmm2
vcomisd xmm0, qword [0x1014e838]
jbe 0x10039c18
vmulss xmm1, xmm3, dword [0x101d16e8]
mov dword [ebp - 0x20], 0xd490d42
xor eax, eax
mov dword [ebp - 0x1c], 0xd490d48
vpmovzxwd xmm0, qword [ebp - 0x20]
vpxor xmm0, xmm0, xmmword [0x1014ec00]
vpshufb xmm0, xmm0, xmmword [0x1014ed80]
vmovq qword [ebp - 0x20], xmm0
vmulss xmm0, xmm4, dword [0x101d16ec]
vaddss xmm1, xmm1, xmm0
vmulss xmm0, xmm5, dword [0x101d16f0]
vaddss xmm0, xmm1, xmm0
vaddss xmm1, xmm0, dword [0x101d16f4]
vmovss xmm0, dword [0x1014e858]
mov word [ebp - 0x18], ax
mov byte [ebp - 0x16], al
lea eax, [ebp - 0x20]
push eax
vdivss xmm0, xmm0, xmm2
vmovsd xmm2, qword [0x1014e8a8]
vmulss xmm0, xmm1, xmm0
vcvtss2sd xmm0, xmm0, xmm0
vmulsd xmm1, xmm0, xmm2
lea eax, [ebp - 4]
mov dword [ebp - 4], 1
push eax
mov eax, dword [ebp - 8]
add eax, dword [ebp - 0x10]
vxorps xmm0, xmm0, xmm0
push 0x1015d1b4
push eax
mov eax, dword [0x10163104]
vcvtsi2sd xmm0, xmm0, eax
vmulsd xmm0, xmm1, xmm0
cdq
vaddsd xmm1, xmm0, xmm2
sub eax, edx
sar eax, 1
vxorps xmm0, xmm0, xmm0
vcvtsi2sd xmm0, xmm0, eax
vaddsd xmm0, xmm1, xmm0
vcvtsd2ss xmm0, xmm0, xmm0
vcvttss2si eax, xmm0
push eax
lea eax, [ebp - 0x24]
push eax
push 0x1015dfac
call fcn.100d07b0
add esp, 0x1c
add esi, 4
cmp esi, edi
jne 0x10039a80
mov ecx, dword [0x101d11a4]
vmovss xmm0, dword [0x1014e858]
push ecx
vmovss dword [esp], xmm0
mov eax, dword [ecx]
mov eax, dword [eax + 0x1b0]
call eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret