Function at 0x43a970
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x3c]
mov edi, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
add ecx, edi
sub ecx, dword [esp + 0x4c]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x24], ecx
cmp ecx, edi
jbe 0x43acca
mov ebp, dword [esp + 0x50]
mov dword [esp], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
jmp 0x43aa0a
mov ecx, dword [esp + 0xc]
mov ebx, ecx
mov eax, dword [esp]
sub ebx, eax
cmp ecx, dword [esp + 8]
je 0x43ab33
mov edx, eax
mov eax, dword [esp + 0x3c]
mov dword [edx + ebx], edi
add ecx, 4
mov dword [esp + 0xc], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x4c]
add edi, ecx
dec edi
inc edi
cmp edi, dword [esp + 0x24]
jae 0x43acca
test ebp, ebp
je 0x43aa50
movzx eax, byte [ebp]
mov byte [esp + 0x14], 0xd7
lea ecx, [esp + 0x15]
mov dword [ecx + 3], 0
mov dword [ecx], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
mov edx, ecx
add dl, 0x7c
xor dl, byte [esp + ecx + 0x14]
add dl, 0x94
mov byte [esp + ecx + 0x14], dl
inc ecx
cmp ecx, 8
jne 0x43aa30
cmp al, byte [esp + 0x14]
mov eax, dword [esp + 0x3c]
je 0x43aa5b
movzx ecx, byte [edi]
mov edx, dword [esp + 0x48]
cmp cl, byte [edx]
jne 0x43a9ff
cmp dword [esp + 0x4c], 2
jb 0x43a9d0
mov ecx, 1
jmp 0x43aa8c
movzx eax, byte [edi + ecx]
mov edx, dword [esp + 0x48]
cmp al, byte [edx + ecx]
jne 0x43ab27
inc ecx
cmp ecx, dword [esp + 0x4c]
je 0x43a9d0
test ebp, ebp
je 0x43aa70
mov esi, edi
movzx eax, byte [ebp + ecx]
mov byte [esp + 4], al
mov byte [esp + 0x10], 0x4b
lea eax, [esp + 0x11]
mov byte [eax + 2], 0
mov word [eax], 0
mov ebx, 0x805ddbe2
mov ebp, 0x1d
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx edx, byte [esp + ebx + 0x7fa2242e]
mov edi, edx
not edi
mov eax, ebp
or eax, edi
add eax, edx
inc eax
and edi, ebx
or edi, eax
mov edx, edi
and edx, 0x15
add edx, edx
xor edi, 0x6a
sub edx, edi
mov byte [esp + ebx + 0x7fa2242e], dl
inc ebx
dec ebp
cmp ebx, 0x805ddbe6
jne 0x43aac0
movzx eax, byte [esp + 4]
cmp al, byte [esp + 0x10]
jne 0x43ab10
mov ebp, dword [esp + 0x50]
mov edi, esi
jmp 0x43aa81
mov edi, esi
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x48]
cmp al, byte [edx + ecx]
mov ebp, dword [esp + 0x50]
je 0x43aa81
add edi, ecx
dec edi
mov eax, dword [esp + 0x3c]
jmp 0x43a9ff
mov ecx, ebx
sar ecx, 2
lea eax, [ecx + 1]
mov esi, ecx
shr esi, 1
add esi, ecx
cmp esi, eax
ja 0x43ab47
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.00409550
add esp, 4
mov edx, eax
mov eax, dword [esp]
test eax, eax
mov dword [esp + 4], edx
je 0x43aca2
mov dword [esp + 0x1c], esi
mov dword [esp + 0x20], edi
cmp edx, eax
mov eax, dword [esp + 0xc]
mov dword [esp + 8], ebx
jbe 0x43ac3f
cmp eax, edx
jbe 0x43ac3f
test ebx, ebx
je 0x43ac87
mov eax, dword [esp]
mov edx, dword [esp + 8]
add eax, edx
dec eax
mov ecx, dword [esp + 4]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x43abd4
neg edi
xor edx, edx
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp edi, edx
jne 0x43abc0
add eax, edx
add ecx, edx
add edx, dword [esp + 8]
mov edi, dword [esp]
sub edi, dword [esp + 0xc]
cmp edi, 0xfffffff8
ja 0x43ac87
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 0x43abf0
jmp 0x43ac87
mov ecx, ebx
shr ecx, 2
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, edx
mov edx, esi
and edx, 0xfffffffc
lea edi, [eax + edx]
add edx, ebx
mov eax, esi
and eax, 3
mov ecx, eax
shr ecx, 1
mov ebx, edx
mov dword [esp + 0xc], edi
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov ecx, esi
test cl, 1
je 0x43ac87
movzx ecx, byte [edx + eax - 1]
mov edx, dword [esp + 0xc]
mov byte [edx + eax - 1], cl
push dword [esp]
call fcn.00409560
add esp, 4
mov edi, dword [esp + 0x20]
mov ebx, dword [esp + 8]
mov esi, dword [esp + 0x1c]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x3c]
mov dword [eax], edx
lea ecx, [edx + esi*4]
mov edx, dword [esp + 4]
add edx, ebx
mov dword [esp + 8], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 4]
mov dword [esp], ecx
mov ecx, edx
mov edx, dword [esp + 4]
jmp 0x43a9eb
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret