Function at 0x404960
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x1a8
mov eax, dword [0x40b040]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
push esi
mov esi, dword [ebp + 0xc]
push edi
movzx edi, byte [ebx + 0x68]
add dword [ebx], eax
mov dword [ebp - 0x70], ebx
adc dword [ebx + 4], 0
lea ecx, [edi + eax]
mov dword [ebp - 0x5c], esi
mov dword [ebp - 0x58], ecx
cmp ecx, 0x40
jb 0x4049e1
push edi
lea eax, [ebx + 0x28]
push eax
lea eax, [ebp - 0x44]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, 0x40
sub eax, edi
push eax
lea eax, [ebp - 0x44]
add eax, edi
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov eax, dword [ebp - 0x58]
sub esi, edi
add eax, 0xffffffc0
mov byte [ebx + 0x68], 0
mov dword [ebp + 0x10], eax
add esi, 0x40
lea eax, [ebp - 0x44]
mov dword [ebp - 0x5c], esi
push eax
push ebx
call fcn.004043c0
mov eax, dword [ebp + 0x10]
add esp, 0x20
cmp eax, 0x40
jb 0x404c28
shr eax, 6
lea ecx, [esi + 2]
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x58], ecx
xor esi, esi
mov edx, ecx
nop word [eax + eax]
movzx ecx, byte [edx - 2]
lea edx, [edx + 4]
movzx eax, byte [edx - 5]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 4]
shl ecx, 8
or ecx, eax
movzx eax, byte [edx - 3]
shl ecx, 8
or ecx, eax
mov dword [ebp + esi*4 - 0x1a8], ecx
inc esi
cmp esi, 0x10
jb 0x404a00
lea eax, [ebp - 0x170]
mov ebx, 0x30
nop word [eax + eax]
mov edx, dword [eax - 0x34]
lea eax, [eax + 4]
mov esi, dword [eax - 4]
mov edi, edx
mov ecx, edx
ror edi, 0x12
ror ecx, 7
xor edi, ecx
shr edx, 3
xor edi, edx
mov ecx, esi
mov edx, esi
ror ecx, 0x11
ror edx, 0x13
xor edx, ecx
shr esi, 0xa
xor edx, esi
add edi, edx
add edi, dword [eax - 0x3c]
add edi, dword [eax - 0x18]
mov dword [eax + 4], edi
sub ebx, 1
jne 0x404a40
mov ebx, dword [ebp - 0x70]
mov edx, dword [ebx + 0x14]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 0x10]
mov dword [ebp - 0x88], edx
mov dword [ebp - 0x68], edx
mov edx, dword [ebx + 0x18]
mov edi, edx
mov dword [ebp - 0x90], edx
mov edx, dword [ebx + 0x1c]
mov esi, edx
mov dword [ebp - 0x94], edx
mov edx, dword [ebx + 0x20]
mov dword [ebp - 0x9c], edx
mov dword [ebp - 0x48], edx
mov edx, dword [ebx + 0x24]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0xa4], edx
mov dword [ebp - 0x64], edx
xor edx, edx
mov dword [ebp - 0x78], eax
mov eax, dword [ebx + 0xc]
mov ebx, dword [ebp - 0x60]
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x80], ecx
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x54], esi
mov dword [ebp - 0x6c], edx
nop
mov eax, dword [ebp - 0x48]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x84], eax
mov eax, edi
ror eax, 0xb
mov dword [ebp - 0xa0], esi
mov esi, edi
ror esi, 0x19
xor esi, eax
mov dword [ebp - 0x8c], ecx
mov eax, edi
mov dword [ebp - 0x60], ebx
ror eax, 6
mov ecx, edi
xor esi, eax
mov dword [ebp - 0x98], edi
mov eax, dword [ebp - 0x54]
not ecx
and ecx, dword [ebp - 0x48]
and eax, edi
xor ecx, eax
mov eax, ebx
add esi, ecx
ror eax, 0xd
add esi, dword [edx + 0x4083a8]
add esi, dword [ebp + edx - 0x1a8]
mov edx, ebx
add esi, dword [ebp - 0x64]
ror edx, 0x16
xor edx, eax
mov eax, ebx
ror eax, 2
xor edx, eax
mov eax, dword [ebp - 0x50]
mov ecx, eax
and eax, dword [ebp - 0x4c]
xor ecx, dword [ebp - 0x4c]
and ecx, ebx
xor ecx, eax
mov eax, dword [ebp - 0x48]
add edx, ecx
mov dword [ebp - 0x64], eax
mov ecx, dword [ebp - 0x50]
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x54], edi
mov edi, dword [ebp - 0x68]
mov dword [ebp - 0x50], ebx
add edi, esi
lea ebx, [edx + esi]
mov dword [ebp - 0x48], eax
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x4c]
add edx, 4
mov esi, dword [ebp - 0x54]
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x6c], edx
cmp edx, 0x100
jb 0x404ae0
mov eax, dword [ebp - 0x78]
add eax, ebx
mov ecx, dword [ebp - 0x58]
mov ebx, dword [ebp - 0x70]
mov esi, dword [ebp - 0x5c]
add esi, 0x40
lea ecx, [ecx + 0x40]
mov dword [ebp - 0x5c], esi
mov dword [ebx + 8], eax
mov eax, dword [ebp - 0x7c]
add eax, dword [ebp - 0x60]
mov dword [ebx + 0xc], eax
mov eax, dword [ebp - 0x80]
add eax, dword [ebp - 0x84]
mov dword [ebx + 0x10], eax
mov eax, dword [ebp - 0x88]
add eax, dword [ebp - 0x8c]
mov dword [ebx + 0x14], eax
mov eax, dword [ebp - 0x90]
add eax, edi
mov dword [ebp - 0x58], ecx
mov dword [ebx + 0x18], eax
mov eax, dword [ebp - 0x94]
add eax, dword [ebp - 0x98]
mov dword [ebx + 0x1c], eax
mov eax, dword [ebp - 0x9c]
add eax, dword [ebp - 0xa0]
mov dword [ebx + 0x20], eax
mov eax, dword [ebp - 0xa4]
add eax, dword [ebp - 0xa8]
mov dword [ebx + 0x24], eax
mov eax, dword [ebp + 0x10]
sub eax, 0x40
sub dword [ebp - 0x74], 1
mov dword [ebp + 0x10], eax
jne 0x4049f6
push eax
movzx eax, byte [ebx + 0x68]
add eax, 0x28
add eax, ebx
push esi
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 4]
add esp, 0xc
mov eax, dword [ebp + 0x10]
xor ecx, ebp
add byte [ebx + 0x68], al
pop edi
pop esi
pop ebx
call fcn.00406008
mov esp, ebp
pop ebp
ret