Function at 0x10314590
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x2c
mov ecx, dword [esp + 0x44]
mov dword [esp], 0
push ebx
push ebp
push esi
mov esi, dword [esp + 0x3c]
push edi
cmp ecx, 0x3000
je 0x103145ba
cmp ecx, 0x4000
je 0x103145ba
xor bl, bl
jmp 0x103145bc
mov bl, 1
push 0
push 0
test bl, bl
mov byte [esp + 0x48], bl
mov eax, 0x60
mov ebp, 0x201
cmovne eax, ebp
push eax
mov eax, dword [esp + 0x64]
push dword [eax]
lea eax, [esp + 0x24]
push esi
push ecx
push eax
call fcn.10310600
mov edi, eax
add esp, 0x1c
test edi, edi
jne 0x1031486e
push 0xbc
push eax
push esi
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esi + 0x20], 0xff9c0000
test bl, bl
mov dword [esi + 0x24], 0x320000
mov eax, 0x30
mov dword [esi + 0x2c], 2
cmovne eax, ebp
mov dword [esi + 0x30], 0x10000
mov ebp, dword [esp + 0x44]
mov dword [esi + 0x3c], 0x10000
mov dword [esi + 0x9c], 0x2210
mov dword [esi], 0xffff
mov dword [esi + 4], 0xffff
mov dword [esi + 8], 0xffff
mov dword [esi + 0xc], 0xffff
mov dword [esi + 0x10], 0xffff
mov dword [esi + 0x14], 0xffff
mov dword [esi + 0x80], 0xffff
mov dword [esi + 0x84], 0xffff
mov dword [esi + 0x88], 0xffff
mov dword [esi + 0xac], 0xffff
mov dword [esi + 0xb8], eax
cmp dword [ebp + 0xc], edi
je 0x103146bc
lea eax, [esp + 0x54]
push eax
lea eax, [esp + 0x14]
push eax
push dword [esp + 0x50]
push ebp
call fcn.103109c0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1031470d
mov eax, dword [esp + 0x54]
jmp 0x103146f6
push dword [ebp + 0x14]
push dword [esp + 0x50]
call fcn.102dfc20
mov edi, eax
add esp, 8
test edi, edi
jne 0x1031486e
lea eax, [esp + 0x10]
push eax
push dword [ebp + 0x18]
push dword [esp + 0x54]
call fcn.102dfee0
mov edi, eax
add esp, 0xc
test edi, edi
jne 0x1031486e
mov eax, dword [ebp + 0x18]
mov ecx, dword [esp + 0x10]
add eax, ecx
push eax
push ecx
lea eax, [esp + 0x1c]
push eax
call fcn.10310690
add esp, 0xc
mov edi, eax
cmp dword [ebp + 0xc], 0
je 0x103147ac
cmp dword [ebp + 0x20], 0
jne 0x1031472d
lea eax, [esp + 0x10]
push eax
push dword [ebp]
call fcn.102dff10
add esp, 8
mov ebp, dword [esp + 0x4c]
test edi, edi
jne 0x1031486e
cmp dword [esi + 0x84], 0xffff
jne 0x1031486e
push edi
push edi
push esi
push dword [esp + 0x64]
call fcn.103114b0
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1031486e
test bl, bl
jne 0x1031481b
mov ebx, dword [esp + 0x5c]
mov eax, dword [ebx + 0x80]
mov eax, dword [eax + 0x3c]
cmp eax, 0xffffffff
jne 0x103147c3
mov edx, dword [ebx + 0x60]
mov eax, dword [edx + 0x44]
mov dword [esi + 0x288], eax
mov eax, dword [edx + 0x44]
test eax, eax
je 0x10314806
nop
mov ecx, eax
shl ecx, 0xd
xor ecx, eax
mov eax, ecx
shr eax, 0x11
xor ecx, eax
mov eax, ecx
shl eax, 5
xor eax, ecx
jl 0x10314790
mov dword [edx + 0x44], eax
jmp 0x10314806
mov ebp, dword [esp + 0x4c]
lea eax, [esp + 0x10]
push eax
push ebp
call fcn.102dff10
add esp, 8
jmp 0x10314731
mov dword [esi + 0x288], eax
mov edx, dword [ebx + 0x80]
add edx, 0x3c
cmp dword [edx], 0
je 0x10314806
mov ecx, dword [edx]
nop dword [eax]
mov eax, ecx
shl eax, 0xd
xor ecx, eax
mov eax, ecx
shr eax, 0x11
xor ecx, eax
mov eax, ecx
shl eax, 5
xor eax, ecx
mov dword [edx], eax
mov edx, dword [ebx + 0x80]
add edx, 0x3c
mov ecx, dword [edx]
test ecx, ecx
js 0x103147e0
cmp dword [esi + 0x288], 0
jne 0x1031481b
mov eax, dword [esi + 0x214]
mov dword [esi + 0x288], eax
mov ecx, dword [esi + 0x218]
test ecx, ecx
je 0x1031486e
mov eax, dword [esi + 0x74]
add eax, ecx
add eax, dword [esp + 0x50]
push eax
push ebp
call fcn.102dfc20
mov edi, eax
add esp, 8
test edi, edi
jne 0x1031486e
push dword [esp + 0x40]
lea ebx, [esi + 0x260]
push 1
push ebp
push ebx
call fcn.10313450
mov edi, eax
add esp, 0x10
test edi, edi
jne 0x1031486e
push eax
push eax
lea eax, [esi + 0x284]
push eax
push ebx
call fcn.10313780
add esp, 0x10
mov edi, eax
mov eax, dword [esp + 0x14]
push dword [esp + 0x24]
push dword [eax]
call fcn.102ddbf0
add esp, 8
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x2c
ret