Function at 0x10039010
Capabilities:
Encode data using xor
Encrypt data using rc4 prga

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x10054040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [0x10056758]
push esi
push edi
mov dword [ebp - 0x34], ecx
lea edi, [ecx + 0x18]
cmp byte [eax + 0x14], 0
je 0x1003957e
cmp byte [edi], 0
je 0x1003957e
mov esi, dword [ecx + 0x20]
cmp dword [ecx + 0x1c], esi
je 0x1003957e
mov eax, dword [ecx + 0x28]
mov edx, dword [ecx + 0x2c]
cmp eax, edx
je 0x1003957e
sub esi, dword [ecx + 0x1c]
sub edx, eax
mov eax, 0x2aaaaaab
sar esi, 2
imul edx
sar edx, 2
mov eax, edx
shr eax, 0x1f
add eax, edx
cmp esi, eax
jne 0x1003957e
mov edx, dword [0x1005675c]
vmovdqu xmm0, xmmword [ecx + 0x34]
vmovd eax, xmm0
vmovdqa xmmword [ebp - 0x50], xmm0
mov esi, dword [edx + 0x6f4]
mov dword [ebp - 0x20], eax
cmp esi, eax
jle 0x100390e5
mov eax, dword [ebp - 0x48]
lea edi, [ecx + 0x18]
add eax, dword [ebp - 0x20]
cmp esi, eax
jge 0x100390e5
mov eax, dword [ebp - 0x4c]
cmp dword [edx + 0x6f8], eax
jle 0x100390e5
mov eax, dword [ebp - 0x44]
lea edi, [ecx + 0x18]
add eax, dword [ebp - 0x4c]
cmp dword [edx + 0x6f8], eax
jge 0x100390e5
mov esi, ecx
mov dword [ebp - 0x24], esi
jmp 0x10039184
vmovdqu xmm0, xmmword [ecx + 0x44]
vmovd eax, xmm0
mov dword [ebp - 0x20], eax
vmovdqa xmmword [ebp - 0x50], xmm0
cmp esi, eax
jle 0x10039126
mov eax, dword [ebp - 0x48]
lea edi, [ecx + 0x18]
add eax, dword [ebp - 0x20]
cmp esi, eax
jge 0x10039126
mov esi, dword [edx + 0x6f8]
cmp esi, dword [ebp - 0x4c]
jle 0x10039126
mov eax, dword [ebp - 0x44]
lea edi, [ecx + 0x18]
add eax, dword [ebp - 0x4c]
cmp esi, eax
jge 0x10039126
mov esi, ecx
mov dword [ebp - 0x24], esi
jmp 0x10039184
cmp byte [edx + 1], 0
je 0x1003917f
cmp byte [edx + 0x101], 0
jne 0x1003917f
lea ecx, [ebp - 0x90]
call fcn.1000a1a0
lea eax, [ebp - 0x90]
mov ecx, edi
push eax
call fcn.10035b80
lea ecx, [ebp - 0x90]
call fcn.1000a310
mov ecx, dword [0x100553b8]
push str.ui_buttonclickrelease.wav
mov eax, dword [ecx]
call dword [eax + 0x138]
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10042579
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov esi, ecx
mov dword [ebp - 0x24], ecx
mov eax, dword [0x10056730]
mov edi, 0x44
vmovss xmm1, dword [0x1004c9f8]
mov eax, dword [eax + 0x44]
vmovdqu xmm0, xmmword [edi + esi]
vmovdqu xmmword [ebp - 0x50], xmm0
vxorps xmm0, xmm0, xmm0
mov ecx, dword [eax + 0x10]
mov edx, ecx
mov eax, ecx
shr edx, 0x18
shr eax, 0x10
mov dword [ebp - 0x20], eax
mov eax, ecx
shr eax, 8
mov dword [ebp - 0x30], eax
mov eax, 0xff
mov dword [ebp - 0x2c], ecx
mov ecx, edx
sub eax, ecx
mov edi, dword [0x100553b8]
vcvtsi2ss xmm0, xmm0, eax
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
mov ecx, 0xff
movzx esi, dl
mov edx, dword [ebp - 0x20]
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
mov ecx, 0xff
movzx eax, dl
mov edx, dword [ebp - 0x30]
or esi, eax
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [ebp - 0x2c]
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
movzx eax, dl
mov edx, 0xff
or esi, eax
movzx eax, cl
sub edx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, edx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub cl, al
movzx eax, cl
mov ecx, edi
or esi, eax
mov eax, dword [edi]
push esi
call dword [eax + 0x28]
vmovdqu xmm0, xmmword [ebp - 0x50]
mov ecx, dword [0x100553b8]
vpextrd esi, xmm0, 1
vpextrd eax, xmm0, 3
add eax, esi
mov edi, dword [ecx]
push eax
vmovd edx, xmm0
vpextrd eax, xmm0, 2
add eax, edx
push eax
push esi
push edx
call dword [edi + 0x30]
mov eax, dword [0x10056730]
mov eax, dword [eax + 0x44]
vmovss xmm1, dword [0x1004ca00]
mov edi, dword [0x100553b8]
mov ecx, dword [eax + 0x10]
mov eax, ecx
shr eax, 0x10
mov edx, ecx
mov dword [ebp - 0x20], eax
mov eax, ecx
shr eax, 8
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x24]
mov dword [ebp - 0x2c], ecx
mov ecx, 0x44
shr edx, 0x18
vmovdqu xmm0, xmmword [ecx + eax]
vmovdqu xmmword [ebp - 0x50], xmm0
mov eax, edx
mov ecx, 0xff
sub ecx, eax
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
mov ecx, 0xff
movzx esi, dl
mov edx, dword [ebp - 0x20]
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
mov ecx, 0xff
movzx eax, dl
mov edx, dword [ebp - 0x30]
or esi, eax
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [ebp - 0x2c]
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub dl, al
movzx eax, dl
mov edx, 0xff
or esi, eax
movzx eax, cl
sub edx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, edx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
sub cl, al
movzx eax, cl
mov ecx, edi
or esi, eax
mov eax, dword [edi]
push esi
call dword [eax + 0x28]
vmovdqu xmm0, xmmword [ebp - 0x50]
mov ecx, dword [0x100553b8]
vpextrd esi, xmm0, 1
vpextrd eax, xmm0, 3
add eax, esi
mov edi, dword [ecx]
push eax
vmovd edx, xmm0
vpextrd eax, xmm0, 2
add eax, edx
push eax
push esi
push edx
call dword [edi + 0x38]
mov edi, dword [ebp - 0x34]
mov ecx, dword [edi + 0x20]
xor edx, edx
sub ecx, dword [edi + 0x1c]
mov eax, dword [edi + 0x50]
sar ecx, 2
div ecx
xor edx, edx
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x28], edx
test ecx, ecx
je 0x100395a2
mov dword [ebp - 0x24], edx
xor ecx, ecx
mov dword [ebp - 0x30], edx
mov esi, dword [edi + 0x28]
add esi, edx
cmp dword [esi + 0x14], 0xf
jbe 0x100393d1
mov esi, dword [esi]
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + ecx*4]
cmp byte [eax], 0
je 0x100393e6
vmovss xmm1, dword [0x1004c900]
jmp 0x100393ee
vmovss xmm1, dword [0x1004c8e4]
mov eax, dword [0x10056730]
vxorps xmm0, xmm0, xmm0
push esi
mov eax, dword [eax + 0x44]
mov ecx, dword [eax + 0x18]
mov edx, dword [eax + 0x10]
mov eax, edx
shr eax, 0x18
mov dword [ebp - 0x54], eax
mov dword [ebp - 0x2c], edx
mov eax, edx
shr eax, 8
mov dword [ebp - 0x38], eax
mov eax, ecx
shr eax, 0x10
mov dword [ebp - 0x34], ecx
movzx ecx, al
shr edx, 0x10
movzx eax, dl
sub ecx, eax
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [ebp - 0x34]
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
add al, dl
shr ecx, 0x18
mov edx, dword [ebp - 0x54]
movzx esi, al
vxorps xmm0, xmm0, xmm0
movzx eax, dl
sub ecx, eax
vcvtsi2ss xmm0, xmm0, ecx
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
add al, dl
mov edx, dword [ebp - 0x38]
movzx eax, al
shl eax, 8
or esi, eax
mov eax, dword [ebp - 0x34]
shr eax, 8
movzx ecx, al
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [ebp - 0x34]
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
add al, dl
movzx ecx, cl
mov edx, dword [ebp - 0x2c]
movzx eax, al
or esi, eax
movzx eax, dl
sub ecx, eax
shl esi, 8
vxorps xmm0, xmm0, xmm0
vcvtsi2ss xmm0, xmm0, ecx
mov ecx, dword [0x1005673c]
vmulss xmm0, xmm0, xmm1
vcvttss2si eax, xmm0
add al, dl
mov edx, 0x44
movzx eax, al
or esi, eax
mov eax, dword [edi + 0x48]
push esi
mov esi, dword [ebp - 0x24]
inc eax
push 1
push dword [ecx + 0x38]
add eax, esi
push eax
mov eax, edi
mov eax, dword [edx + eax]
add eax, 4
push eax
push ecx
call fcn.1001bd80
mov ecx, dword [0x1005675c]
add esp, 0x1c
cmp byte [ecx + 1], 0
je 0x10039544
cmp byte [ecx + 0x101], 0
jne 0x10039544
mov edx, dword [edi + 0x48]
add edx, esi
mov esi, edi
mov dword [ebp - 0x38], edx
mov edx, 0x44
mov eax, dword [edx + esi]
mov esi, dword [ebp - 0x24]
mov edx, dword [ebp - 0x38]
cmp dword [ecx + 0x6f4], eax
jle 0x10039544
add eax, dword [edi + 0x4c]
cmp dword [ecx + 0x6f4], eax
jge 0x10039544
mov ecx, dword [ecx + 0x6f8]
cmp ecx, edx
jle 0x10039544
mov eax, dword [ebp - 0x20]
add eax, edx
cmp ecx, eax
jge 0x10039544
mov eax, dword [edi + 0x1c]
mov edx, dword [ebp - 0x28]
mov ecx, dword [eax + edx*4]
cmp byte [ecx], 0
sete al
mov byte [ecx], al
mov eax, dword [edi + 0x20]
mov ecx, dword [ebp - 0x28]
sub eax, dword [edi + 0x1c]
inc ecx
mov edx, dword [ebp - 0x30]
add esi, dword [ebp - 0x20]
add edx, 0x18
sar eax, 2
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x24], esi
cmp ecx, eax
jb 0x100393c4
pop edi
pop esi
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10042579
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
lea ecx, [ebp - 0x90]
call fcn.1000a1a0
lea eax, [ebp - 0x90]
mov ecx, edi
push eax
call fcn.10035b80
lea ecx, [ebp - 0x90]
call fcn.1000a310
mov ecx, dword [ebp - 4]
pop edi
xor ecx, ebp
pop esi
call fcn.10042579
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret