Function at 0x40b490
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0xc
push ebx
push ebp
push edi
push 0x2000
push 0
push esi
call fcn.00422ac0
add esp, 0xc
xor ebp, ebp
mov dword [esp + 0x10], ebp
lea esp, [esp]
test ebp, ebp
jne 0x40b585
mov eax, dword [esp + 0x1c]
mov ecx, dword [eax]
mov dword [esi + 0x180], ecx
mov edx, dword [eax + 4]
mov dword [esi + 0x184], edx
mov ecx, dword [eax + 8]
mov dword [esi + 0x188], ecx
mov edx, dword [eax + 0xc]
mov dword [esi + 0x18c], edx
mov edi, 4
lea ecx, [edi + 8]
shl ecx, 5
mov edx, dword [ecx + esi]
add ecx, esi
lea eax, [edi + 0x10]
shl eax, 4
add eax, esi
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
call fcn.0040b370
sar edi, 1
test edi, edi
jg 0x40b4e4
mov edx, dword [esi + 0x110]
mov ecx, dword [esi + 0x114]
lea eax, [esi + 0x80]
mov dword [eax], edx
mov edx, dword [esi + 0x118]
mov dword [eax + 4], ecx
mov ecx, dword [esi + 0x11c]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
call fcn.0040b370
mov edi, 4
lea esp, [esp]
mov ecx, edi
shl ecx, 5
add ecx, esi
mov edx, edi
shl edx, 4
lea eax, [edx + esi]
mov edx, dword [ecx]
mov dword [eax], edx
mov edx, dword [ecx + 4]
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov dword [eax + 8], edx
mov ecx, dword [ecx + 0xc]
mov dword [eax + 0xc], ecx
call fcn.0040b370
sar edi, 1
test edi, edi
jg 0x40b550
jmp 0x40b62b
cmp ebp, 1
jle 0x40b62b
lea ecx, [ebp - 2]
shl ecx, 4
mov eax, ebp
shl eax, 4
mov edi, 8
mov dword [esp + 0x14], ecx
mov dword [esp + 0xc], eax
jmp 0x40b5b8
mov eax, dword [esp + 0xc]
mov ecx, dword [esp + 0x14]
add ecx, edi
shl ecx, 4
mov edx, dword [ecx + esi]
add ecx, esi
add eax, edi
shl eax, 4
mov dword [eax + esi], edx
mov edx, dword [ecx + 4]
add eax, esi
mov dword [eax + 4], edx
mov edx, dword [ecx + 8]
mov ecx, dword [ecx + 0xc]
mov dword [eax + 8], edx
mov dword [eax + 0xc], ecx
mov edx, dword [eax + 8]
mov ebx, ecx
mov ebp, edx
shr ebp, 0x18
shl ecx, 8
or ebp, ecx
mov ecx, dword [eax + 4]
mov dword [eax + 0xc], ebp
mov ebp, ecx
shr ebp, 0x18
shl edx, 8
or ebp, edx
mov edx, dword [eax]
mov dword [eax + 8], ebp
mov ebp, edx
shl ecx, 8
shr ebp, 0x18
or ebp, ecx
shr ebx, 0x18
mov dword [eax + 4], ebp
movzx ecx, word [ebx*2 + 0x454ee0]
shl edx, 8
xor ecx, edx
sar edi, 1
test edi, edi
mov dword [eax], ecx
jg 0x40b5b0
mov ebp, dword [esp + 0x10]
mov edx, ebp
shl edx, 8
mov ebx, ebp
lea eax, [edx + esi + 0x10]
shl ebx, 4
mov edi, 2
mov dword [esp + 0x14], eax
mov dword [esp + 0xc], ebx
lea ecx, [ebx + edi]
shl ecx, 4
cmp edi, 1
lea edx, [ecx + esi]
mov ecx, dword [esp + 0x14]
lea eax, [edx + 0x10]
jle 0x40b6a2
lea ebx, [edi - 1]
mov edi, edi
mov ebp, dword [ecx]
xor ebp, dword [edx]
add ecx, 4
mov dword [eax], ebp
mov ebp, dword [ecx]
xor ebp, dword [edx + 4]
add eax, 4
mov dword [eax], ebp
mov ebp, dword [ecx + 4]
xor ebp, dword [edx + 8]
add ecx, 4
add eax, 4
mov dword [eax], ebp
mov ebp, dword [ecx + 4]
xor ebp, dword [edx + 0xc]
add ecx, 4
add eax, 4
mov dword [eax], ebp
add eax, 4
add ecx, 4
sub ebx, 1
jne 0x40b660
mov ebp, dword [esp + 0x10]
mov ebx, dword [esp + 0xc]
add edi, edi
cmp edi, 0x10
jl 0x40b646
add ebp, 1
cmp ebp, 0x20
mov dword [esp + 0x10], ebp
jl 0x40b4b0
pop edi
pop ebp
pop ebx
add esp, 0xc
ret