Function at 0x4027a0
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
mov eax, dword [esp + 0xc]
mov edx, dword [esp + 0x1c]
push ebx
mov ebx, dword [esp + 0x18]
push ebp
push esi
push edi
mov edi, dword [eax + 0x20]
lea ecx, [eax + 0x24]
mov dword [esp + 0x10], edi
mov dword [esp + 0x14], ecx
lea ecx, [edi + ebx]
cmp ecx, 8
mov dword [edx], ecx
ja 0x4027fb
mov esi, dword [esp + 0x20]
mov ecx, ebx
mov ebp, ecx
lea edi, [edi + eax + 0x18]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [eax + 0x20]
pop edi
add ecx, ebx
pop esi
mov dword [eax + 0x20], ecx
pop ebp
mov dword [edx], 0
xor eax, eax
pop ebx
add esp, 8
ret
mov ebp, dword [esp + 0x20]
mov ebx, dword [esp + 0x28]
cmp ebp, ebx
jne 0x402814
pop edi
pop esi
pop ebp
mov eax, 0x1001
pop ebx
add esp, 8
ret
mov dword [edx], ecx
mov ecx, 8
sub ecx, edi
mov esi, ebp
mov dword [esp + 0x20], ecx
mov edx, ecx
lea edi, [edi + eax + 0x18]
push ebx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x28]
mov esi, edx
mov edx, dword [esp + 0x14]
add ebp, esi
lea esi, [ecx + edx - 8]
lea ecx, [eax + 0x18]
mov dword [esp + 0x24], ecx
mov dword [esp + 0x28], esi
mov ecx, dword [ecx]
mov dword [ebx], ecx
mov edx, dword [eax + 0x1c]
mov eax, dword [esp + 0x18]
mov dword [ebx + 4], edx
push eax
call fcn.00401c40
mov edi, dword [esp + 0x24]
mov edx, dword [ebx]
mov eax, dword [ebx + 4]
add esp, 8
mov ecx, dword [edi + 0x10]
add ebx, 8
xor edx, ecx
mov dword [ebx - 8], edx
mov edx, dword [edi + 0x14]
xor eax, edx
cmp esi, 8
mov dword [ebx - 4], eax
jbe 0x40291c
mov eax, dword [ebp]
push ebx
mov dword [ebx], eax
mov ecx, dword [ebp + 4]
lea eax, [edi + 0x24]
mov dword [ebx + 4], ecx
push eax
call fcn.00401c40
mov edx, dword [esp + 0x28]
mov ecx, dword [ebx]
sub esi, 8
add esp, 8
mov eax, dword [edx]
mov edx, dword [ebx + 4]
xor ecx, eax
add ebp, 8
mov dword [ebx], ecx
mov ecx, dword [edi + 0x1c]
xor edx, ecx
mov dword [esp + 0x24], esi
mov dword [ebx + 4], edx
add ebx, 8
cmp esi, 8
jbe 0x40291c
lea eax, [esi - 1]
shr eax, 3
mov dword [esp + 0x24], eax
mov edx, dword [ebp]
push ebx
mov dword [ebx], edx
mov eax, dword [ebp + 4]
mov dword [ebx + 4], eax
lea eax, [edi + 0x24]
push eax
call fcn.00401c40
mov ecx, dword [ebp - 8]
mov edx, dword [ebx]
mov eax, dword [esp + 0x2c]
xor edx, ecx
mov ecx, dword [ebx + 4]
mov dword [ebx], edx
mov edx, dword [ebp - 4]
add esp, 8
xor ecx, edx
add ebp, 8
mov dword [ebx + 4], ecx
add ebx, 8
sub esi, 8
dec eax
mov dword [esp + 0x24], eax
jne 0x4028d8
mov dword [esp + 0x24], esi
mov eax, dword [ebp - 8]
mov dword [edi + 0x10], eax
mov ecx, dword [ebp - 4]
mov dword [edi + 0x14], ecx
mov edi, dword [esp + 0x20]
mov ecx, esi
mov esi, ebp
mov edx, ecx
mov eax, dword [esp + 0x24]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x1c]
pop edi
pop esi
pop ebp
mov edx, dword [ecx + 0x20]
pop ebx
and edx, 0xf0000000
add edx, eax
mov dword [ecx + 0x20], edx
mov ecx, dword [esp + 0x1c]
mov edx, dword [ecx]
sub edx, eax
xor eax, eax
mov dword [ecx], edx
add esp, 8
ret