Function at 0x43f7a0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [esp + 0x38]
mov edi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add ecx, edi
sub ecx, dword [esp + 0x48]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x20], ecx
cmp ecx, edi
jbe 0x43fafa
mov ebp, dword [esp + 0x4c]
mov dword [esp], 0
mov dword [esp + 4], 0
mov dword [esp + 0xc], 0
jmp 0x43f838
mov ecx, dword [esp + 4]
mov ebx, ecx
mov edx, dword [esp]
sub ebx, edx
cmp ecx, dword [esp + 0xc]
je 0x43f943
mov eax, dword [esp + 0x38]
mov dword [edx + ebx], edi
add ecx, 4
mov dword [esp + 4], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x48]
add edi, ecx
dec edi
inc edi
cmp edi, dword [esp + 0x20]
jae 0x43fafa
test ebp, ebp
je 0x43f870
movzx eax, byte [ebp]
mov byte [esp + 0x10], 0xdd
mov dword [esp + 0x11], 0
xor ecx, ecx
nop
mov edx, ecx
add dl, 0xa5
xor dl, byte [esp + ecx + 0x10]
add dl, 0xc7
mov byte [esp + ecx + 0x10], dl
inc ecx
cmp ecx, 5
jne 0x43f850
cmp al, byte [esp + 0x10]
mov eax, dword [esp + 0x38]
je 0x43f87b
movzx ecx, byte [edi]
mov edx, dword [esp + 0x44]
cmp cl, byte [edx]
jne 0x43f82d
cmp dword [esp + 0x48], 2
jb 0x43f800
mov ecx, 1
jmp 0x43f8ac
movzx eax, byte [edi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
jne 0x43f937
inc ecx
cmp ecx, dword [esp + 0x48]
je 0x43f800
test ebp, ebp
je 0x43f890
mov esi, edi
movzx eax, byte [ebp + ecx]
mov byte [esp + 8], al
mov byte [esp + 0x10], 0xb
lea eax, [esp + 0x11]
mov byte [eax + 4], 0
mov dword [eax], 0
mov ebx, 0x3a609911
lea eax, [esp + 0x10]
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [eax]
mov edi, ebx
or edi, edx
lea ebp, [ebx - 0x3a609900]
and ebp, edx
lea edx, [edi + edi]
not edx
add edx, edi
or edx, ebp
add dl, 0x5a
mov byte [eax], dl
inc eax
dec ebx
cmp ebx, 0x3a60990b
jne 0x43f8e0
movzx eax, byte [esp + 8]
cmp al, byte [esp + 0x10]
jne 0x43f920
mov ebp, dword [esp + 0x4c]
mov edi, esi
jmp 0x43f8a1
mov edi, esi
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
mov ebp, dword [esp + 0x4c]
je 0x43f8a1
add edi, ecx
dec edi
mov eax, dword [esp + 0x38]
jmp 0x43f82d
mov ecx, ebx
sar ecx, 2
lea eax, [ecx + 1]
mov esi, ecx
shr esi, 1
add esi, ecx
cmp esi, eax
ja 0x43f957
mov esi, eax
mov eax, esi
and eax, 0xfffffffb
mov ecx, esi
and ecx, 4
mov edx, esi
or edx, 4
imul edx, ecx
xor ecx, 4
imul ecx, eax
add edx, ecx
push edx
call fcn.004088e0
add esp, 4
mov edx, eax
mov eax, dword [esp]
test eax, eax
je 0x43fada
mov dword [esp + 0xc], edi
lea ecx, [ebx + 0x2fc1cda6]
cmp edx, eax
mov eax, dword [esp + 4]
mov dword [esp + 8], ebx
mov dword [esp + 0x1c], edx
jbe 0x43fa5f
cmp eax, edx
jbe 0x43fa5f
test ebx, ebx
je 0x43fac3
mov eax, dword [esp]
add eax, ecx
add eax, 0xd03e3259
mov edx, ecx
mov ecx, dword [esp + 0x1c]
add ecx, edx
add ecx, 0xd03e3259
mov edx, dword [esp + 8]
mov edi, edx
and edi, 7
je 0x43f9f4
neg edi
xor edx, edx
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp edi, edx
jne 0x43f9e0
add eax, edx
add ecx, edx
add edx, dword [esp + 8]
mov edi, dword [esp]
sub edi, dword [esp + 4]
cmp edi, 0xfffffff8
ja 0x43fac3
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edi]
mov byte [ecx + edi], bl
movzx ebx, byte [eax + edi - 1]
mov byte [ecx + edi - 1], bl
movzx ebx, byte [eax + edi - 2]
mov byte [ecx + edi - 2], bl
movzx ebx, byte [eax + edi - 3]
mov byte [ecx + edi - 3], bl
movzx ebx, byte [eax + edi - 4]
mov byte [ecx + edi - 4], bl
movzx ebx, byte [eax + edi - 5]
mov byte [ecx + edi - 5], bl
movzx ebx, byte [eax + edi - 6]
mov byte [ecx + edi - 6], bl
movzx ebx, byte [eax + edi - 7]
mov byte [ecx + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x43fa10
jmp 0x43fac3
mov dword [esp + 0x18], ecx
mov ecx, ebx
shr ecx, 2
mov dword [esp + 4], esi
mov esi, ebx
mov ebx, dword [esp]
mov eax, ebx
mov edi, edx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, 1
mov ecx, dword [esp + 0x18]
sub eax, ecx
or eax, 0xfffffffc
add eax, ecx
add edx, eax
add edx, 0xd03e325b
add eax, ebx
add eax, 0xd03e325b
mov ecx, esi
mov esi, dword [esp + 4]
shr ecx, 1
and ecx, 1
mov ebx, eax
mov edi, edx
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test byte [esp + 0x18], 1
je 0x43fac3
mov ecx, dword [esp + 8]
and ecx, 2
movzx eax, byte [eax + ecx]
mov byte [edx + ecx], al
push dword [esp]
call fcn.004088f0
add esp, 4
mov edi, dword [esp + 0xc]
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x38]
mov dword [eax], edx
lea ecx, [edx + esi*4]
mov esi, edx
add esi, ebx
mov dword [esp + 0xc], ecx
mov dword [eax + 8], ecx
mov ecx, edx
mov dword [esp], edx
mov ecx, esi
jmp 0x43f819
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret