Function at 0x40a1a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x50
mov eax, dword [esp + 0xa8]
mov esi, dword [esp + 0x64]
mov ecx, dword [esi + 0x48]
mov edi, dword [ecx + 4]
mov dword [esp + 0x4c], edi
test eax, eax
je 0x40a1d2
cmp dword [ecx + 0x34], 0
jne 0x40a1d2
mov dword [esi + 0x1c], 3
jmp 0x40a79c
mov dword [esp], ecx
movzx ecx, word [esp + 0x74]
movzx edx, word [esp + 0x6c]
movzx ecx, cx
movzx ebx, word [esp + 0x7c]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x48], edx
add ecx, edx
add ecx, ebx
mov ebp, dword [esp + 0xb4]
xor edx, edx
add ecx, ebp
setb dl
add ecx, edi
adc edx, 0
add ecx, 0x2e
adc edx, 0
cmp ecx, 0xffffffff
sbb edx, 0
jb 0x40a220
mov dword [esi + 0x1c], 0xf
jmp 0x40a79c
mov dword [esp + 0x38], ebx
mov dword [esp + 4], edi
mov edi, dword [esp + 0x8c]
mov ecx, dword [esp + 0x84]
mov dword [esp + 0x40], ecx
mov dword [esp + 0xe], 0
mov dword [esp + 0x12], 0
mov dword [esp + 0x16], 0
mov dword [esp + 0x1a], 0
mov dword [esp + 0x1e], 0
mov dword [esp + 0x22], 0
mov dword [esp + 0x26], 0
mov dword [esp + 0x2a], 0
mov word [esp + 0x2e], 0
mov dword [esp + 0xa], 0x2014b50
movzx esi, word [esp + 0x94]
mov ebx, dword [esp + 0x90]
movzx ecx, word [esp + 0x74]
add ecx, ebp
mov dword [esp + 0x44], ecx
xor ecx, ecx
mov edx, 0
mov ebp, esi
test si, si
je 0x40a2b3
mov dl, 0x14
mov byte [esp + 0x10], dl
movzx edx, word [esp + 0x98]
mov byte [esp + 0x12], dl
mov byte [esp + 0x13], dh
mov edx, ebp
mov byte [esp + 0x14], dl
mov byte [esp + 0x15], dh
movzx edx, word [esp + 0x9c]
mov byte [esp + 0x16], dl
mov byte [esp + 0x17], dh
movzx edx, word [esp + 0xa0]
mov byte [esp + 0x18], dl
mov byte [esp + 0x19], dh
mov byte [esp + 0x1a], bl
mov byte [esp + 0x1b], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x1c], dl
shr ebx, 0x18
neg edi
mov edx, 0
sbb edx, edx
mov byte [esp + 0x1d], bl
or edx, dword [esp + 0x88]
mov byte [esp + 0x1e], dl
mov byte [esp + 0x1f], dh
mov ebx, edx
shr ebx, 0x10
mov byte [esp + 0x20], bl
shr edx, 0x18
neg dword [esp + 0x40]
mov ebx, 0
sbb ebx, ebx
mov byte [esp + 0x21], dl
or ebx, dword [esp + 0x80]
mov byte [esp + 0x22], bl
mov byte [esp + 0x23], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x24], dl
shr ebx, 0x18
mov byte [esp + 0x25], bl
movzx edx, word [esp + 0x6c]
mov byte [esp + 0x26], dl
mov byte [esp + 0x27], dh
mov edx, dword [esp + 0x44]
mov byte [esp + 0x28], dl
mov byte [esp + 0x29], dh
movzx edx, word [esp + 0x7c]
mov byte [esp + 0x2a], dl
mov byte [esp + 0x2b], dh
mov ebx, dword [esp + 0xac]
mov byte [esp + 0x30], bl
mov byte [esp + 0x31], bh
mov edx, ebx
shr edx, 0x10
mov byte [esp + 0x32], dl
shr ebx, 0x18
neg eax
sbb ecx, ecx
mov byte [esp + 0x33], bl
or ecx, dword [esp + 0xa4]
mov byte [esp + 0x34], cl
mov byte [esp + 0x35], ch
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x36], al
shr ecx, 0x18
mov byte [esp + 0x37], cl
mov ebx, dword [esp + 4]
lea esi, [ebx + 0x2e]
mov edx, dword [esp]
mov eax, dword [edx + 8]
cmp eax, esi
mov ebp, dword [esp + 0x48]
jae 0x40a40e
cmp eax, 1
adc eax, 0
cmp esi, 2
jb 0x40a412
mov edi, eax
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov ecx, eax
or ecx, 2
and edi, 2
imul ecx, edi
and eax, 0xfffffffd
xor edi, 2
imul edi, eax
add edi, ecx
mov eax, edi
cmp edi, esi
jb 0x40a3f0
jmp 0x40a414
mov eax, dword [edx]
jmp 0x40a43c
mov edi, eax
push edi
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x40a769
mov dword [edx], eax
mov dword [edx + 8], edi
mov ebx, dword [esp + 4]
mov dword [edx + 4], esi
mov ecx, dword [edx + 0xc]
mov esi, ebx
not esi
and esi, ecx
mov edx, ecx
not edx
and edx, ebx
imul edx, esi
mov esi, ecx
and esi, ebx
imul edi, ecx, 0x2e
or ecx, ebx
imul ecx, esi
add ecx, eax
add ecx, edx
lea eax, [esp + 0xa]
push edi
push eax
push ecx
call fcn.0040c900
mov edx, dword [esp + 0xc]
add esp, 0xc
mov ebx, dword [edx + 4]
mov eax, dword [edx + 8]
lea edi, [ebx + ebp]
cmp eax, edi
jae 0x40a4ae
cmp eax, 1
adc eax, 0
cmp edi, 2
jb 0x40a4b2
mov esi, eax
nop
nop
mov ecx, eax
or ecx, 2
and esi, 2
imul ecx, esi
and eax, 0xfffffffd
xor esi, 2
imul esi, eax
add esi, ecx
mov eax, esi
cmp esi, edi
jb 0x40a490
jmp 0x40a4b4
mov esi, eax
jmp 0x40a4d8
mov esi, eax
push esi
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x40a769
mov dword [edx], eax
mov dword [edx + 8], esi
mov dword [edx + 4], edi
cmp word [esp + 0x6c], 0
je 0x40a520
mov eax, dword [edx + 0xc]
mov edx, ebx
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, ebx
imul ecx, edx
mov edx, eax
and edx, ebx
or ebx, eax
imul ebx, edx
mov edx, dword [esp]
add ebx, dword [edx]
add ebx, ecx
imul ebp, eax
push ebp
push dword [esp + 0x6c]
push ebx
call fcn.0040c900
mov edx, dword [esp + 0xc]
add esp, 0xc
mov edi, dword [edx + 4]
mov esi, dword [edx + 8]
mov eax, dword [esp + 0x3c]
lea ebp, [edi + eax]
cmp esi, ebp
jae 0x40a55e
cmp esi, 1
adc esi, 0
cmp ebp, 2
jb 0x40a562
mov ebx, esi
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, esi
or eax, 2
and ebx, 2
imul eax, ebx
and esi, 0xfffffffd
xor ebx, 2
imul ebx, esi
add ebx, eax
mov esi, ebx
cmp ebx, ebp
jb 0x40a540
jmp 0x40a564
mov ebx, esi
jmp 0x40a588
mov ebx, esi
push ebx
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x40a769
mov dword [edx], eax
mov dword [edx + 8], ebx
movzx eax, word [esp + 0x74]
mov dword [edx + 4], ebp
test ax, ax
je 0x40a5d6
mov eax, dword [edx + 0xc]
mov edx, edi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, edi
imul ecx, edx
mov edx, eax
and edx, edi
or edi, eax
imul edi, edx
mov edx, dword [esp]
add edi, dword [edx]
add edi, ecx
mov ecx, dword [esp + 0x3c]
imul ecx, eax
push ecx
push dword [esp + 0x74]
push edi
call fcn.0040c900
mov edx, dword [esp + 0xc]
add esp, 0xc
mov ebp, dword [edx + 4]
mov ebx, dword [edx + 8]
mov eax, dword [esp + 0xb4]
lea edi, [eax + ebp]
cmp ebx, edi
jae 0x40a61e
cmp ebx, 1
adc ebx, 0
cmp edi, 2
jb 0x40a622
mov esi, ebx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
or eax, 2
and esi, 2
imul eax, esi
and ebx, 0xfffffffd
xor esi, 2
imul esi, ebx
add esi, eax
mov ebx, esi
cmp esi, edi
jb 0x40a600
jmp 0x40a624
mov esi, ebx
jmp 0x40a64f
mov esi, ebx
push esi
push dword [edx + 0xc]
push dword [edx]
mov eax, dword [esp + 0x70]
push dword [eax + 0x34]
call dword [eax + 0x30]
mov edx, dword [esp + 0x10]
add esp, 0x10
test eax, eax
je 0x40a769
mov dword [edx], eax
mov dword [edx + 8], esi
mov eax, dword [esp + 0xb4]
mov dword [edx + 4], edi
test eax, eax
mov ebx, dword [esp + 0x38]
je 0x40a69c
mov esi, eax
mov eax, dword [edx + 0xc]
mov edx, ebp
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, ebp
imul ecx, edx
mov edx, eax
and edx, ebp
or ebp, eax
imul ebp, edx
mov edx, dword [esp]
add ebp, dword [edx]
add ebp, ecx
imul esi, eax
push esi
push dword [esp + 0xb4]
push ebp
call fcn.0040c900
mov edx, dword [esp + 0xc]
add esp, 0xc
mov edi, dword [edx + 4]
mov esi, dword [edx + 8]
add ebx, edi
cmp esi, ebx
jae 0x40a6c0
mov ecx, dword [esp + 0x64]
mov edx, dword [esp]
push 1
push ebx
call fcn.0040c7b0
mov edx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x40a769
mov dword [edx + 4], ebx
cmp word [esp + 0x7c], 0
je 0x40a706
mov eax, dword [edx + 0xc]
mov edx, edi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, edi
imul ecx, edx
mov edx, eax
and edx, edi
or edi, eax
imul edi, edx
mov edx, dword [esp]
add edi, dword [edx]
add edi, ecx
mov ecx, dword [esp + 0x38]
imul ecx, eax
push ecx
push dword [esp + 0x7c]
push edi
call fcn.0040c900
mov edx, dword [esp + 0xc]
add esp, 0xc
mov esi, dword [edx + 0x14]
lea edi, [esi + 1]
cmp dword [edx + 0x18], edi
jae 0x40a72e
mov eax, dword [esp]
lea edx, [eax + 0x10]
mov ecx, dword [esp + 0x64]
push 1
push edi
call fcn.0040c7b0
mov edx, dword [esp + 8]
add esp, 8
test eax, eax
je 0x40a769
mov dword [edx + 0x14], edi
mov eax, dword [edx + 0x1c]
mov edi, edx
mov edx, esi
not edx
and edx, eax
mov ecx, eax
not ecx
and ecx, esi
imul ecx, edx
mov edx, eax
and edx, esi
or esi, eax
imul esi, edx
add esi, dword [edi + 0x10]
add esi, ecx
lea ecx, [esp + 0x4c]
push eax
push ecx
push esi
call fcn.0040c900
add esp, 0xc
mov eax, 1
jmp 0x40a79e
mov ebx, dword [esp + 4]
cmp dword [edx + 8], ebx
mov edi, dword [esp + 0x64]
jae 0x40a792
push ebx
push dword [edx + 0xc]
push dword [edx]
push dword [edi + 0x34]
mov esi, edx
call dword [edi + 0x30]
add esp, 0x10
test eax, eax
je 0x40a795
mov dword [esi], eax
mov dword [esi + 8], ebx
mov edx, esi
mov dword [edx + 4], ebx
mov dword [edi + 0x1c], 0x10
xor eax, eax
add esp, 0x50
pop esi
pop edi
pop ebx
pop ebp
ret