Function at 0x40a410
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x54
mov eax, dword [0x472128]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x10]
push ebx
mov ebx, dword [ebp + 8]
mov dword [ebp - 0x54], ebx
push esi
push edi
mov edi, dword [ebp + 0x14]
test edx, edx
je 0x40a6bd
test ebx, ebx
je 0x40a6d0
mov esi, dword [ebp + 0xc]
test esi, esi
je 0x40a6e1
test edi, edi
je 0x40a6f2
mov eax, dword [ebx + 0x84]
cmp eax, 8
je 0x40a466
cmp eax, 0x18
jne 0x40a703
mov ecx, dword [ebx + 0x80]
test ecx, ecx
je 0x40a4ce
cmp ecx, edx
mov eax, edx
cmovb eax, ecx
mov dword [ebp - 0x4c], eax
test eax, eax
je 0x40a4bc
mov edx, esi
mov ecx, edi
sub edx, edi
mov dword [ebp - 0x48], edx
mov edx, eax
mov esi, dword [ebp - 0x48]
nop dword [eax]
mov eax, ebx
lea ecx, [ecx + 1]
sub eax, dword [ebx + 0x80]
mov al, byte [eax + 0x80]
xor al, byte [esi + ecx - 1]
mov byte [ecx - 1], al
dec dword [ebx + 0x80]
sub edx, 1
jne 0x40a490
mov esi, dword [ebp + 0xc]
mov edx, dword [ebp + 0x10]
mov eax, dword [ebp - 0x4c]
sub edx, eax
mov dword [ebp + 0x10], edx
je 0x40a6bd
add edi, eax
add esi, eax
mov dword [ebp + 0xc], esi
lea ecx, [ebp - 0x44]
mov eax, edi
sub eax, ecx
mov dword [ebp - 0x4c], eax
mov eax, esi
sub eax, ecx
mov dword [ebp - 0x48], eax
lea eax, [edi + 0x3f]
mov dword [ebp - 0x50], eax
push dword [ebx + 0x88]
lea eax, [ebp - 0x44]
push ebx
push eax
call fcn.0040a0d0
add esp, 0xc
add dword [ebx + 0x20], 1
jne 0x40a508
add dword [ebx + 0x24], 1
je 0x40a5af
mov ecx, dword [ebp + 0x10]
cmp ecx, 0x40
jbe 0x40a5c5
mov edx, dword [ebp - 0x50]
lea ecx, [ebp - 5]
xor eax, eax
cmp edi, ecx
ja 0x40a527
lea ecx, [ebp - 0x44]
cmp edx, ecx
jae 0x40a532
lea ecx, [esi + 0x3f]
cmp edi, ecx
ja 0x40a553
cmp edx, esi
jb 0x40a553
mov ebx, dword [ebp - 0x4c]
mov esi, dword [ebp - 0x48]
lea edx, [ebp - 0x44]
add edx, eax
inc eax
mov cl, byte [esi + edx]
xor cl, byte [edx]
mov byte [ebx + edx], cl
cmp eax, 0x40
jb 0x40a538
mov esi, dword [ebp + 0xc]
mov ebx, dword [ebp - 0x54]
jmp 0x40a591
movups xmm0, xmmword [ebp - 0x44]
movups xmm1, xmmword [esi]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp - 0x34]
movups xmmword [edi], xmm1
movups xmm1, xmmword [esi + 0x10]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp - 0x24]
movups xmmword [edx - 0x2f], xmm1
movups xmm1, xmmword [esi + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp - 0x14]
movups xmmword [edx - 0x1f], xmm1
movups xmm1, xmmword [esi + 0x30]
pxor xmm1, xmm0
movups xmmword [edx - 0xf], xmm1
sub dword [ebp + 0x10], 0x40
add esi, 0x40
add dword [ebp - 0x50], 0x40
add edi, 0x40
add dword [ebp - 0x4c], 0x40
add dword [ebp - 0x48], 0x40
mov dword [ebp + 0xc], esi
jmp 0x40a4e5
pop edi
pop esi
mov eax, 0x13
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.00421234
mov esp, ebp
pop ebp
ret
xor edx, edx
test ecx, ecx
je 0x40a695
cmp ecx, 0x40
jb 0x40a675
lea eax, [ebp + ecx - 0x45]
cmp edi, eax
ja 0x40a5f4
lea eax, [ebp - 0x44]
mov dword [ebp - 0x48], eax
lea eax, [ecx - 1]
add eax, edi
cmp eax, dword [ebp - 0x48]
jae 0x40a675
lea eax, [ecx - 1]
add eax, esi
cmp edi, eax
ja 0x40a606
lea eax, [ecx - 1]
add eax, edi
cmp eax, esi
jae 0x40a675
mov eax, ecx
mov ebx, esi
and eax, 0xffffffc0
sub ebx, edi
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x54]
mov ecx, dword [ebp - 0x48]
mov dword [ebp - 0x4c], eax
lea eax, [edi + 0x10]
nop
movups xmm0, xmmword [ebp + edx - 0x44]
lea eax, [eax + 0x40]
movups xmm1, xmmword [esi + edx]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + edx - 0x34]
movups xmmword [edi + edx], xmm1
movups xmm1, xmmword [ecx + eax - 0x40]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + edx - 0x24]
movups xmmword [eax - 0x40], xmm1
movups xmm1, xmmword [esi + edx + 0x20]
pxor xmm1, xmm0
movups xmm0, xmmword [ebp + edx - 0x14]
movups xmmword [eax - 0x30], xmm1
movups xmm1, xmmword [esi + edx + 0x30]
add edx, 0x40
pxor xmm1, xmm0
movups xmmword [eax - 0x20], xmm1
cmp edx, dword [ebp - 0x4c]
jb 0x40a620
mov ecx, dword [ebp + 0x10]
cmp edx, ecx
jae 0x40a695
lea eax, [ebp - 0x44]
sub esi, eax
sub edi, eax
lea ecx, [ebp - 0x44]
add ecx, edx
inc edx
mov al, byte [esi + ecx]
xor al, byte [ecx]
mov byte [edi + ecx], al
mov ecx, dword [ebp + 0x10]
cmp edx, ecx
jb 0x40a680
mov esi, 0x40
sub esi, ecx
mov dword [ebx + 0x80], esi
cmp ecx, 0x40
jae 0x40a6bd
lea eax, [ebp - 0x44]
add ecx, 0x40
add eax, dword [ebp + 0x10]
add ecx, ebx
push esi
push eax
push ecx
call fcn.00438190
add esp, 0xc
mov ecx, dword [ebp - 4]
xor eax, eax
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00421234
mov esp, ebp
pop ebp
ret
push 0x3e
push str.f:_sourcecryptlibtomcrypt_src_stream_salsa20_salsa20_crypt.c
push str.st___NULL
call fcn.0040c100
push 0x3f
push str.f:_sourcecryptlibtomcrypt_src_stream_salsa20_salsa20_crypt.c
push str.in___NULL
call fcn.0040c100
push 0x40
push str.f:_sourcecryptlibtomcrypt_src_stream_salsa20_salsa20_crypt.c
push str.out___NULL
call fcn.0040c100
push 0x41
push str.f:_sourcecryptlibtomcrypt_src_stream_salsa20_salsa20_crypt.c
push str.st__ivlen__8__st__ivlen__24
call fcn.0040c100
int3