Function at 0x404207
Capabilities:
Encode data using xor

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, 0x2b8
push esi
lea eax, [ebp - 0x2b0]
push edi
push eax
call fcn.00425470
mov eax, dword [ebx + 0x10]
mov dl, byte [eax + 0x28]
xor ecx, ecx
add esp, 4
cmp dl, cl
je 0x404168
cmp dl, 8
je 0x40415c
mov edi, edi
cmp dword [ebx + 0xc], ecx
je 0x404331
movzx edx, byte [eax + 0x28]
mov dl, byte [edx + eax + 0x30]
mov esi, dword [ebx + 8]
xor byte [esi], dl
mov edx, 1
add byte [eax + 0x28], dl
sub dword [ebx + 0xc], edx
add esi, edx
cmp byte [eax + 0x28], 8
mov dword [ebx + 8], esi
jne 0x404130
cmp dword [ebx + 0xc], ecx
je 0x404331
mov byte [eax + 0x28], cl
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], ecx
mov dword [ebp - 0x28], ecx
mov dword [ebp - 0x24], ecx
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], ecx
mov esi, eax
mov ecx, 8
lea edi, [ebp - 0xb0]
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov ecx, 8
lea edi, [ebp - 0x90]
rep movsd dword es:[edi], dword [esi]
mov esi, eax
mov ecx, 8
lea edi, [ebp - 0x70]
rep movsd dword es:[edi], dword [esi]
mov esi, eax
lea eax, [ebp - 0xb0]
mov ecx, 8
lea edi, [ebp - 0x50]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.0042552e
mov esi, dword [ebx + 0x10]
movzx ecx, byte [esi + 0x38]
mov eax, dword [ebx + 0xc]
mov edi, eax
add ecx, 0xfffffffe
add esp, 4
shr edi, 5
cmp ecx, 5
ja case.0x4041dc.2
jmp dword [ecx*4 + 0x40433c]
mov dword [ebp - 4], 0x444f88
jmp 0x40420e
mov dword [ebp - 4], 0x444fc8
jmp 0x40420e
mov dword [ebp - 4], 0x445008
jmp 0x40420e
mov dword [ebp - 4], 0x445048
jmp 0x40420e
mov dword [ebp - 4], 0x444f48
test edi, edi
je 0x404266
mov dword [ebp - 8], edi
mov ecx, dword [esi + 0x20]
mov edx, dword [esi + 0x24]
lea eax, [ebp - 0x30]
push eax
mov dword [ebp - 0x30], ecx
mov dword [ebp - 0x2c], edx
call fcn.00425924
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x14]
lea eax, [ebp - 0xb0]
mov dword [esi + 0x20], ecx
mov ecx, dword [ebp - 4]
push eax
mov dword [esi + 0x24], edx
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.004259dd
mov ecx, dword [ebx + 8]
lea eax, [ebp - 0x30]
push eax
push ecx
call fcn.004256d4
add dword [ebx + 8], 0x20
add esp, 0x18
dec dword [ebp - 8]
jne 0x404215
mov eax, dword [ebx + 0xc]
imul edi, edi, 0xffffffe0
add eax, edi
mov edi, eax
shr edi, 3
and eax, 7
and edi, 3
mov dword [ebp - 8], eax
jne 0x404283
test eax, eax
je 0x404322
mov edx, dword [esi + 0x20]
mov eax, dword [esi + 0x24]
lea ecx, [ebp - 0x30]
push ecx
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], eax
call fcn.00425924
add esp, 4
cmp dword [ebp - 8], 0
lea eax, [ebp + edi*8 - 0x30]
mov dword [ebp - 0xc], eax
je 0x4042b5
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [esi + 0x20], edx
mov dword [esi + 0x24], eax
jmp 0x4042c1
mov ecx, dword [eax - 8]
mov edx, dword [eax - 4]
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0xb0]
push eax
push ecx
lea edx, [ebp - 0x30]
push edx
call fcn.004259dd
add esp, 0xc
xor eax, eax
test edi, edi
je 0x4042fb
mov edi, edi
mov ecx, dword [ebx + 8]
mov edx, dword [ebp + eax*8 - 0x30]
xor dword [ecx], edx
mov edx, dword [ebp + eax*8 - 0x2c]
xor dword [ecx + 4], edx
add ecx, 8
inc eax
mov dword [ebx + 8], ecx
cmp eax, edi
jb 0x4042e0
mov ecx, dword [ebp - 8]
test ecx, ecx
je 0x404322
mov edi, dword [ebp - 0xc]
mov eax, dword [edi]
mov edx, dword [edi + 4]
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], edx
mov eax, dword [ebx + 8]
mov dl, byte [edi]
xor byte [eax], dl
inc byte [esi + 0x28]
inc eax
inc edi
dec ecx
mov dword [ebx + 8], eax
jne 0x404310
lea eax, [ebp - 0x2b0]
push eax
call fcn.0042547b
add esp, 4
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret