Function at 0x40a4fa
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push edi
mov edi, ecx
mov dword [ebp - 0x24], edx
xor ebx, ebx
mov dword [ebp - 0x20], edi
cmp dword [edi + 0x74], ebx
je 0x40a519
mov ecx, dword [edi]
call dword [edi + 4]
mov dword [edi + 0x74], ebx
cmp dword [edi + 0x6c], ebx
je 0x40a529
mov eax, dword [edi + 0x90]
jmp 0x40aa08
mov ecx, edi
call fcn.0040a088
test eax, eax
jne 0x40aa08
mov ebx, dword [edi + 0x78]
mov eax, ebx
or eax, dword [edi + 0x7c]
push esi
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x18], ebx
jne 0x40a5a9
mov ecx, dword [edi]
call dword [edi + 8]
mov ecx, edi
test eax, eax
je 0x40aa00
lea edx, [ebp - 0x1c]
call fcn.00408b49
mov eax, dword [edi + 0x44]
lea esi, [edi + 0x98]
shl eax, 5
lea edx, [edi + 0x32608]
push 0
add edx, eax
mov ecx, esi
call fcn.00408700
mov eax, dword [edi + 0x44]
mov ecx, dword [edi]
mov eax, dword [eax*4 + 0x46f800]
mov dword [edi + 0x44], eax
call dword [edi + 0xc]
sub eax, dword [edi + 0x30]
mov ecx, esi
mov edx, dword [edi + 0x60]
mov al, byte [eax]
movzx eax, al
push eax
call fcn.00408756
dec dword [edi + 0x30]
inc ebx
mov dword [ebp - 0x14], ebx
mov ecx, dword [edi]
call dword [edi + 8]
test eax, eax
je 0x40a9f2
cmp dword [edi + 0x64], 0
mov ecx, edi
je 0x40a5c8
lea edx, [ebp - 0x10]
call fcn.00409d0e
jmp 0x40a5d3
lea eax, [ebp - 0x10]
mov edx, ebx
push eax
call fcn.00408d9b
mov edx, dword [edi + 0x58]
mov esi, dword [ebp - 0x10]
and edx, ebx
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], edx
cmp eax, 1
jne 0x40a6c0
cmp esi, 0xffffffff
jne 0x40a6c0
mov eax, dword [edi + 0x44]
lea ecx, [edi + 0x98]
add edx, 0x19304
shl eax, 4
add eax, edx
mov dword [ebp - 0xc], ecx
push 0
lea edx, [edi + eax*2]
call fcn.00408700
mov ecx, dword [edi]
call dword [edi + 0xc]
mov esi, eax
sub esi, dword [edi + 0x30]
push 8
pop ecx
sub cl, byte [edi + 0x48]
mov al, byte [esi]
movzx edx, byte [esi - 1]
mov byte [ebp - 1], al
mov eax, dword [edi + 0x54]
shr edx, cl
and eax, ebx
mov ecx, dword [edi + 0x48]
shl eax, cl
add edx, eax
imul edx, edx, 0x600
add edx, dword [edi + 0x60]
cmp dword [edi + 0x44], 7
mov dword [ebp - 0x1c], edx
jae 0x40a65f
movzx eax, byte [ebp - 1]
lea ecx, [edi + 0x98]
push eax
call fcn.00408756
jmp 0x40a6b1
sub esi, dword [edi + 0x34]
mov ecx, 0x100
mov ebx, ecx
movzx edi, byte [esi - 1]
movzx esi, byte [ebp - 1]
or esi, ecx
mov eax, esi
add edi, edi
shr eax, 7
mov ecx, ebx
and eax, 1
and ecx, edi
push eax
mov eax, esi
add ecx, ebx
shr eax, 8
add eax, ecx
mov ecx, dword [ebp - 0xc]
lea edx, [edx + eax*2]
call fcn.00408700
mov edx, dword [ebp - 0x1c]
add esi, esi
mov eax, esi
xor eax, edi
not eax
and ebx, eax
cmp esi, 0x10000
jb 0x40a673
mov edi, dword [ebp - 0x20]
mov ebx, dword [ebp - 0x14]
mov eax, dword [edi + 0x44]
mov eax, dword [eax*4 + 0x46f800]
jmp 0x40a814
mov eax, dword [edi + 0x44]
lea ecx, [edi + 0x98]
add edx, 0x19304
shl eax, 4
add edx, eax
push 1
lea edx, [edi + edx*2]
call fcn.00408700
lea ecx, [edi + 0x98]
cmp esi, 4
jae 0x40a81c
mov edx, dword [edi + 0x44]
add edx, 0x193c4
push 1
lea edx, [edi + edx*2]
call fcn.00408700
mov edx, dword [edi + 0x44]
add edx, 0x193d0
lea edx, [edi + edx*2]
test esi, esi
jne 0x40a746
push esi
lea esi, [edi + 0x98]
mov ecx, esi
call fcn.00408700
mov edx, dword [edi + 0x44]
xor eax, eax
cmp dword [ebp - 8], 1
mov ecx, esi
setne al
shl edx, 4
add edx, 0x193f4
add edx, dword [ebp - 0xc]
push eax
lea edx, [edi + edx*2]
call fcn.00408700
jmp 0x40a7d2
mov eax, dword [edi + esi*4 + 0x34]
lea ecx, [edi + 0x98]
push 1
mov dword [ebp - 0x1c], eax
call fcn.00408700
cmp esi, 1
jne 0x40a77c
mov edx, dword [edi + 0x44]
lea esi, [edi + 0x98]
add edx, 0x193dc
mov ecx, esi
push 0
lea edx, [edi + edx*2]
call fcn.00408700
jmp 0x40a7c6
mov eax, dword [edi + 0x44]
lea ecx, [edi + 0x98]
add eax, 0x193dc
push 1
lea edx, [edi + eax*2]
call fcn.00408700
mov edx, dword [edi + 0x44]
lea eax, [esi - 2]
add edx, 0x193e8
lea ecx, [edi + 0x98]
push eax
lea edx, [edi + edx*2]
call fcn.00408700
cmp esi, 3
jne 0x40a7ba
mov eax, dword [edi + 0x3c]
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x38]
lea esi, [edi + 0x98]
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 0x34]
mov dword [edi + 0x38], eax
mov eax, dword [ebp - 0x1c]
mov dword [edi + 0x34], eax
mov ecx, dword [ebp - 8]
cmp ecx, 1
jne 0x40a7e6
mov eax, dword [edi + 0x44]
mov eax, dword [eax*4 + 0x46f7d0]
jmp 0x40a814
lea eax, [edi + 0x30f34]
mov edx, esi
push eax
xor eax, eax
cmp dword [edi + 0x64], eax
sete al
push eax
push dword [ebp - 0xc]
lea eax, [ecx - 2]
push eax
lea ecx, [edi + 0x374b4]
call fcn.00408ab3
mov eax, dword [edi + 0x44]
mov eax, dword [eax*4 + str._b_b_b_b_b_b_b_v_v_v_v_v_a_a_a_a_a_a_a_n_n_n_n_n_t_t_t_t_t_t_t_v_v_v_v_v]
mov dword [edi + 0x44], eax
jmp 0x40a954
mov eax, dword [edi + 0x44]
add eax, 0x193c4
push 0
lea edx, [edi + eax*2]
call fcn.00408700
mov eax, dword [edi + 0x44]
lea ecx, [edi + 0x32c6c]
lea edx, [edi + 0x98]
mov eax, dword [eax*4 + 0x46f7a0]
mov dword [edi + 0x44], eax
lea eax, [edi + 0x30f34]
push eax
xor eax, eax
cmp dword [edi + 0x64], eax
sete al
push eax
push dword [ebp - 0xc]
mov eax, dword [ebp - 8]
add eax, 0xfffffffe
push eax
call fcn.00408ab3
sub esi, 4
mov dword [ebp - 0x10], esi
cmp esi, 0x80
jae 0x40a87e
movzx eax, byte [esi + edi + 0x30734]
jmp 0x40a89b
cmp esi, 0x20000
mov eax, esi
sbb ecx, ecx
and ecx, 0xfffffff6
add ecx, 0x10
shr eax, cl
movzx eax, byte [eax + edi + 0x30734]
lea eax, [eax + ecx*2]
mov edx, dword [ebp - 8]
cmp edx, 5
push eax
push 6
push 3
mov dword [ebp - 0x14], eax
lea eax, [edx - 2]
pop ecx
cmovb ecx, eax
shl ecx, 7
lea edx, [ecx + 0x32968]
add edx, edi
lea ecx, [edi + 0x98]
call fcn.0040883f
mov edx, dword [ebp - 0x14]
cmp edx, 4
jb 0x40a939
mov ecx, edx
mov dword [ebp - 0xc], esi
mov eax, edx
shr ecx, 1
and eax, 1
dec ecx
or eax, 2
shl eax, cl
sub dword [ebp - 0xc], eax
cmp edx, 0xe
jae 0x40a904
push dword [ebp - 0xc]
sub eax, edx
push ecx
lea ecx, [edi + 0x98]
lea edx, [eax + 0x195b3]
lea edx, [edi + edx*2]
call fcn.00408884
jmp 0x40a939
mov edx, dword [ebp - 0xc]
lea eax, [ecx - 4]
push eax
shr edx, 4
lea ecx, [edi + 0x98]
call fcn.004086b4
mov eax, dword [ebp - 0xc]
lea edx, [edi + 0x32c4c]
and eax, 0xf
lea ecx, [edi + 0x98]
push eax
push 4
call fcn.00408884
inc dword [edi + 0x84]
mov eax, dword [edi + 0x3c]
mov dword [edi + 0x40], eax
mov eax, dword [edi + 0x38]
mov dword [edi + 0x3c], eax
mov eax, dword [edi + 0x34]
mov dword [edi + 0x38], eax
mov dword [edi + 0x34], esi
inc dword [edi + 0x80]
mov eax, dword [ebp - 8]
add ebx, eax
sub dword [edi + 0x30], eax
cmp dword [edi + 0x30], 0
mov dword [ebp - 0x14], ebx
jne 0x40a5b6
cmp dword [edi + 0x64], 0
jne 0x40a992
cmp dword [edi + 0x80], 0x80
jb 0x40a982
mov ecx, edi
call fcn.0040a161
cmp dword [edi + 0x84], 0x10
jb 0x40a992
mov ecx, edi
call fcn.0040a10b
mov ecx, dword [edi]
call dword [edi + 8]
test eax, eax
je 0x40a9f2
mov esi, dword [ebp - 0x18]
mov eax, ebx
sub eax, esi
cmp dword [ebp - 0x24], 0
je 0x40aa10
add eax, 0x112c
cmp eax, dword [ebp + 0xc]
jae 0x40a9f2
mov eax, dword [edi + 0xb0]
sub eax, dword [edi + 0xb8]
cdq
add eax, dword [edi + 0xc0]
adc edx, dword [edi + 0xc4]
add eax, dword [edi + 0xa8]
adc edx, dword [edi + 0xac]
add eax, 0x2000
adc edx, 0
test edx, edx
ja 0x40a9f2
jb 0x40a5b6
cmp eax, dword [ebp + 8]
jb 0x40a5b6
mov eax, ebx
mov ecx, edi
sub eax, dword [ebp - 0x18]
add dword [edi + 0x78], eax
adc dword [edi + 0x7c], 0
mov edx, ebx
call fcn.0040a0c9
pop esi
pop edi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp eax, 0x20000
jb 0x40a5b6
sub ebx, esi
mov ecx, edi
add dword [edi + 0x78], ebx
adc dword [edi + 0x7c], 0
call fcn.0040a088
jmp 0x40aa07