Function at 0x3662b170
Capabilities:
Encode data using xor

Disassembly:
sub esp, 0x20
mov eax, dword [esp + 0x38]
push ebx
push ebp
mov ebp, dword [esp + 0x30]
push esi
cmp ebp, 8
push edi
jne 0x3662b249
cmp eax, 1
jne 0x3662b1cd
mov edi, dword [esp + 0x4c]
mov eax, dword [esp + 0x40]
mov esi, dword [esp + 0x3c]
push 1
mov ecx, dword [edi]
mov edx, dword [eax]
mov ebp, dword [eax + 4]
mov eax, dword [esp + 0x48]
xor ecx, edx
mov edx, dword [edi + 4]
push eax
xor edx, ebp
push esi
mov dword [esi], ecx
push esi
mov dword [esi + 4], edx
call dword [esp + 0x44]
mov ecx, dword [esi]
mov dword [edi], ecx
mov edx, dword [esi + 4]
mov dword [edi + 4], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
mov esi, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
cmp esi, edi
je 0x3662b211
mov eax, dword [esp + 0x44]
push 0
push eax
push edi
push esi
call dword [esp + 0x44]
mov edx, dword [esi]
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
xor edx, ecx
mov dword [esi], edx
mov edx, dword [eax + 4]
mov ecx, dword [esi + 4]
xor ecx, edx
mov dword [esi + 4], ecx
mov ecx, dword [edi]
mov dword [eax], ecx
mov edx, dword [edi + 4]
mov dword [eax + 4], edx
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
mov eax, dword [esp + 0x44]
mov ebx, dword [edi]
mov ebp, dword [edi + 4]
push 0
push eax
push edi
push esi
call dword [esp + 0x44]
mov edx, dword [esi]
mov eax, dword [esp + 0x4c]
mov ecx, dword [eax]
xor edx, ecx
mov dword [esi], edx
mov edx, dword [eax + 4]
mov ecx, dword [esi + 4]
xor ecx, edx
mov dword [esi + 4], ecx
mov dword [eax], ebx
mov dword [eax + 4], ebp
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
cmp eax, 1
jne 0x3662b29d
mov ebx, dword [esp + 0x4c]
mov edi, dword [esp + 0x40]
test ebp, ebp
jbe 0x3662b26b
mov ecx, ebx
mov eax, edi
sub ecx, edi
mov esi, ebp
mov dl, byte [ecx + eax]
xor byte [eax], dl
inc eax
dec esi
jne 0x3662b262
mov eax, dword [esp + 0x44]
mov esi, dword [esp + 0x3c]
push 1
push eax
push edi
push esi
call dword [esp + 0x44]
test ebp, ebp
jbe 0x3662b330
mov ecx, esi
mov eax, ebx
sub ecx, ebx
mov dl, byte [ecx + eax]
mov byte [eax], dl
inc eax
dec ebp
jne 0x3662b28a
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
mov ebx, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
cmp esi, ebx
je 0x3662b2e1
mov eax, dword [esp + 0x44]
push 0
push eax
push esi
push ebx
call dword [esp + 0x44]
test ebp, ebp
jbe 0x3662b330
mov ecx, dword [esp + 0x4c]
sub esi, ebx
mov eax, ebx
sub ecx, ebx
mov dl, byte [ecx + eax]
mov bl, byte [eax]
xor bl, dl
mov byte [eax], bl
mov dl, byte [esi + eax]
mov byte [ecx + eax], dl
inc eax
dec ebp
jne 0x3662b2c4
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c
cmp ebp, 0x20
ja 0x3662b330
mov ecx, ebp
lea edi, [esp + 0x10]
mov eax, ecx
mov edx, dword [esp + 0x40]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push 0
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x48]
push ecx
push edx
push ebx
call dword [esp + 0x44]
test ebp, ebp
jbe 0x3662b330
mov ecx, dword [esp + 0x4c]
lea esi, [esp + 0x10]
sub esi, ebx
mov eax, ebx
sub ecx, ebx
mov dl, byte [eax + ecx]
mov bl, byte [eax]
xor bl, dl
mov dl, byte [esi + eax]
mov byte [eax], bl
mov byte [eax + ecx], dl
inc eax
dec ebp
jne 0x3662b31d
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x20
ret 0x1c