Function at 0x43c940
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov eax, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov ecx, dword [esp + 0x40]
add ecx, esi
sub ecx, dword [esp + 0x48]
mov dword [eax + 8], 0
mov dword [eax + 4], 0
mov dword [eax], 0
mov dword [esp + 0x1c], ecx
cmp ecx, esi
jbe 0x43cc6e
mov ebp, dword [esp + 0x4c]
mov dword [esp + 8], 0
mov dword [esp], 0
mov dword [esp + 0x10], 0
jmp 0x43c9b3
mov eax, ecx
xor eax, 1
and ecx, 0xfffffffe
add ecx, ecx
sub ecx, eax
add esi, ecx
mov eax, dword [esp + 0x38]
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x43cc6e
test ebp, ebp
je 0x43c9fd
movzx ecx, byte [ebp]
mov byte [esp + 0x14], 0xd7
lea eax, [esp + 0x15]
mov byte [eax + 4], 0
mov dword [eax], 0
xor edx, edx
mov eax, edx
and al, 0xfc
mov ah, dl
and ah, 3
sub al, ah
movzx ebx, al
mov eax, edx
xor eax, 0x24
add eax, edx
add eax, ebx
xor al, byte [esp + edx + 0x14]
add al, 0x4c
mov byte [esp + edx + 0x14], al
inc edx
cmp edx, 6
jne 0x43c9d0
cmp cl, byte [esp + 0x14]
je 0x43ca08
movzx eax, byte [esi]
mov ecx, dword [esp + 0x44]
cmp al, byte [ecx]
jne 0x43c9a4
cmp dword [esp + 0x48], 2
jb 0x43caa0
mov ecx, 1
mov dword [esp + 0x20], esi
jmp 0x43ca38
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
jne 0x43c996
inc ecx
cmp ecx, dword [esp + 0x48]
je 0x43caa0
test ebp, ebp
je 0x43ca20
mov esi, ebp
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x14], 0xf7
lea eax, [esp + 0x15]
mov word [eax + 4], 0
mov dword [eax], 0
mov ebx, 0xc
nop
nop
nop
mov edi, ebx
not edi
lea eax, [ebx - 0x532d8640]
and edi, 0x1e
mov ebp, eax
xor ebp, 0x9e
or eax, 0x41
and eax, ebp
or eax, edi
xor al, byte [esp + ebx + 8]
xor al, 0x9e
add al, 4
mov byte [esp + ebx + 8], al
inc ebx
cmp ebx, 0x13
jne 0x43ca60
cmp dl, byte [esp + 0x14]
mov ebp, esi
mov esi, dword [esp + 0x20]
jne 0x43ca20
jmp 0x43ca31
mov ecx, dword [esp + 8]
mov edi, ecx
mov eax, dword [esp]
sub edi, eax
cmp ecx, dword [esp + 0x10]
je 0x43cabc
mov edx, eax
mov eax, dword [esp + 0x38]
jmp 0x43cc55
mov ecx, edi
sar ecx, 2
lea eax, [ecx + 1]
mov ebx, ecx
shr ebx, 1
add ebx, ecx
cmp ebx, eax
ja 0x43cad0
mov ebx, eax
mov eax, ebx
and eax, 0xfffffffb
mov ecx, ebx
and ecx, 4
mov edx, ebx
or edx, 4
imul edx, ecx
xor ecx, 4
imul ecx, eax
add edx, ecx
push edx
call fcn.00408c10
add esp, 4
mov edx, eax
mov eax, dword [esp]
test eax, eax
mov dword [esp + 0xc], edx
je 0x43cc32
mov dword [esp + 0x10], ebx
cmp edx, eax
mov eax, dword [esp + 8]
mov dword [esp + 4], edi
jbe 0x43cbcf
cmp eax, edx
jbe 0x43cbcf
test edi, edi
je 0x43cc1b
mov edx, dword [esp + 4]
mov eax, edx
and eax, 0xfffffffe
mov ecx, edx
not ecx
and ecx, 1
sub eax, ecx
mov ecx, dword [esp]
add ecx, eax
add eax, dword [esp + 0xc]
mov edi, edx
and edi, 7
je 0x43cb64
neg edi
xor edx, edx
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x43cb50
add ecx, edx
add eax, edx
add edx, dword [esp + 4]
mov edi, dword [esp]
sub edi, dword [esp + 8]
cmp edi, 0xfffffff8
ja 0x43cc1b
neg edx
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edi]
mov byte [eax + edi], bl
movzx ebx, byte [ecx + edi - 1]
mov byte [eax + edi - 1], bl
movzx ebx, byte [ecx + edi - 2]
mov byte [eax + edi - 2], bl
movzx ebx, byte [ecx + edi - 3]
mov byte [eax + edi - 3], bl
movzx ebx, byte [ecx + edi - 4]
mov byte [eax + edi - 4], bl
movzx ebx, byte [ecx + edi - 5]
mov byte [eax + edi - 5], bl
movzx ebx, byte [ecx + edi - 6]
mov byte [eax + edi - 6], bl
movzx ebx, byte [ecx + edi - 7]
mov byte [eax + edi - 7], bl
add edi, 0xfffffff8
cmp edx, edi
jne 0x43cb80
jmp 0x43cc1b
mov ecx, edi
shr ecx, 2
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 ecx, dword [esp + 4]
mov edx, ecx
and edx, 0xfffffffc
add eax, edx
add edx, ebx
shr ecx, 1
and ecx, 1
mov ebx, edx
mov dword [esp + 8], eax
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test byte [esp + 4], 1
je 0x43cc1b
mov ecx, dword [esp + 4]
and ecx, 2
movzx edx, byte [edx + ecx]
mov eax, dword [esp + 8]
mov byte [eax + ecx], dl
push dword [esp]
call fcn.00408c20
add esp, 4
mov edi, dword [esp + 4]
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0xc]
mov eax, dword [esp + 0x38]
mov dword [eax], edx
lea ecx, [edx + ebx*4]
mov edx, dword [esp + 0xc]
add edx, edi
mov dword [esp + 0x10], ecx
mov dword [eax + 8], ecx
mov ecx, dword [esp + 0xc]
mov dword [esp], ecx
mov ecx, edx
mov edx, dword [esp + 0xc]
mov dword [edx + edi], esi
add ecx, 4
mov dword [esp + 8], ecx
mov dword [eax + 4], ecx
mov ecx, dword [esp + 0x48]
add esi, ecx
dec esi
jmp 0x43c9a8
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret