Function at 0x43a660
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 0x43a9a6
mov esi, dword [esp + 0x50]
mov dword [esp + 4], 0
mov dword [esp], 0
mov dword [esp + 0x20], 0
jmp 0x43a6c8
add edi, edx
dec edi
mov eax, dword [esp + 0x3c]
inc edi
cmp edi, dword [esp + 0x24]
jae 0x43a9a6
test esi, esi
je 0x43a70c
movzx eax, byte [esi]
mov byte [esp + 0xc], 0xe5
lea ecx, [esp + 0xd]
mov word [ecx + 4], 0
mov dword [ecx], 0
xor ecx, ecx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
mov edx, ecx
add dl, 0x79
xor dl, byte [esp + ecx + 0xc]
add dl, 0xa3
mov byte [esp + ecx + 0xc], dl
inc ecx
cmp ecx, 7
jne 0x43a6f0
cmp al, byte [esp + 0xc]
je 0x43a717
movzx eax, byte [edi]
mov ecx, dword [esp + 0x48]
cmp al, byte [ecx]
jne 0x43a6b9
cmp dword [esp + 0x4c], 2
jb 0x43a800
mov edx, 1
mov dword [esp + 0x14], edi
jmp 0x43a74c
movzx eax, byte [edi + edx]
mov ecx, dword [esp + 0x48]
cmp al, byte [ecx + edx]
jne 0x43a6b6
inc edx
cmp edx, dword [esp + 0x4c]
je 0x43a800
test esi, esi
je 0x43a730
mov dword [esp + 8], edx
movzx eax, byte [esi + edx]
mov byte [esp + 0x18], al
mov byte [esp + 0xc], 0xe5
lea eax, [esp + 0xd]
mov dword [eax + 3], 0
mov dword [eax], 0
xor ebp, ebp
mov eax, 0xffffffff
xor edi, edi
nop
nop
nop
nop
nop
movzx ecx, byte [esp + edi + 0xc]
mov dword [esp + 0x1c], ecx
mov edx, edi
xor edx, 0x7df62677
lea esi, [eax + edx]
inc esi
and esi, ecx
mov ecx, esi
and ecx, 0xfffffffd
mov ebx, esi
and ebx, 2
or esi, 2
imul esi, ebx
xor ebx, 2
imul ebx, ecx
lea ecx, [esi + ebx]
sub ecx, edx
sub edx, ebx
sub edx, esi
add ecx, ebp
add edx, eax
mov esi, dword [esp + 0x1c]
and edx, esi
not esi
and esi, ecx
sub edx, esi
add dl, 0xad
mov byte [esp + edi + 0xc], dl
inc edi
add ebp, 0xfffffffe
add eax, 2
cmp edi, 8
jne 0x43a780
movzx eax, byte [esp + 0x18]
cmp al, byte [esp + 0xc]
mov edi, dword [esp + 0x14]
mov esi, dword [esp + 0x50]
mov edx, dword [esp + 8]
jne 0x43a730
jmp 0x43a741
mov ecx, dword [esp + 4]
mov ebp, ecx
mov ebx, dword [esp]
sub ebp, ebx
cmp ecx, dword [esp + 0x20]
je 0x43a81e
mov eax, dword [esp + 0x3c]
mov edx, dword [esp + 4]
jmp 0x43a98d
mov ecx, ebp
sar ecx, 2
lea eax, [ecx + 1]
mov edx, ecx
shr edx, 1
add edx, ecx
cmp edx, eax
ja 0x43a832
mov edx, eax
mov dword [esp + 0x1c], edx
lea eax, [edx*4]
push eax
call fcn.00409730
add esp, 4
mov ebx, eax
mov edx, dword [esp]
test edx, edx
je 0x43a970
lea ecx, [ebp - 0x8fb2cfe]
cmp ebx, edx
mov eax, dword [esp + 4]
mov dword [esp + 8], ebx
jbe 0x43a8b4
cmp eax, ebx
jbe 0x43a8b4
test ebp, ebp
je 0x43a95d
mov eax, dword [esp]
add eax, ecx
add eax, 0x8fb2cfd
mov edx, ecx
mov ecx, dword [esp + 8]
add ecx, edx
add ecx, 0x8fb2cfd
mov esi, ebp
and esi, 7
je 0x43a8fe
neg esi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [eax + edx]
mov byte [ecx + edx], bl
dec edx
cmp esi, edx
jne 0x43a8a0
add eax, edx
add ecx, edx
add edx, ebp
jmp 0x43a900
mov dword [esp + 0x18], ecx
mov ecx, ebp
shr ecx, 2
mov eax, edx
mov dword [esp + 0x14], edi
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov esi, ebp
and esi, 0xfffffffc
lea eax, [ebx + esi]
add esi, edx
mov ecx, ebp
shr ecx, 1
and ecx, 1
mov ebx, esi
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov edi, dword [esp + 0x14]
test byte [esp + 0x18], 1
je 0x43a95d
mov ecx, ebp
and ecx, 2
movzx edx, byte [esi + ecx]
mov byte [eax + ecx], dl
jmp 0x43a95d
mov edx, ebp
mov esi, dword [esp]
sub esi, dword [esp + 4]
cmp esi, 0xfffffff8
ja 0x43a95d
neg edx
xor esi, esi
movzx ebx, byte [eax + esi]
mov byte [ecx + esi], bl
movzx ebx, byte [eax + esi - 1]
mov byte [ecx + esi - 1], bl
movzx ebx, byte [eax + esi - 2]
mov byte [ecx + esi - 2], bl
movzx ebx, byte [eax + esi - 3]
mov byte [ecx + esi - 3], bl
movzx ebx, byte [eax + esi - 4]
mov byte [ecx + esi - 4], bl
movzx ebx, byte [eax + esi - 5]
mov byte [ecx + esi - 5], bl
movzx ebx, byte [eax + esi - 6]
mov byte [ecx + esi - 6], bl
movzx ebx, byte [eax + esi - 7]
mov byte [ecx + esi - 7], bl
add esi, 0xfffffff8
cmp edx, esi
jne 0x43a910
push dword [esp]
call fcn.00409740
add esp, 4
mov esi, dword [esp + 0x50]
mov ebx, dword [esp + 8]
mov eax, dword [esp + 0x3c]
mov dword [eax], ebx
mov ecx, dword [esp + 0x1c]
lea ecx, [ebx + ecx*4]
mov edx, ebx
add edx, ebp
mov dword [esp + 0x20], ecx
mov dword [eax + 8], ecx
mov ecx, ebx
mov dword [esp], ebx
mov dword [ebx + ebp], edi
add edx, 4
mov dword [esp + 4], edx
mov dword [eax + 4], edx
mov ecx, dword [esp + 0x4c]
add edi, ecx
dec edi
jmp 0x43a6bd
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret