Function at 0x43d870
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x20
mov edi, dword [esp + 0x34]
mov esi, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
add eax, esi
sub eax, dword [esp + 0x44]
mov dword [edi + 8], 0
mov dword [edi + 4], 0
mov dword [edi], 0
mov dword [esp + 0x1c], eax
cmp eax, esi
jbe 0x43db78
mov ebp, dword [esp + 0x48]
xor ecx, ecx
mov dword [esp], 0
mov dword [esp + 0xc], 0
jmp 0x43d8f0
mov ecx, dword [esp + 4]
mov ebx, ecx
mov eax, dword [esp]
sub ebx, eax
cmp ecx, dword [esp + 0xc]
je 0x43d9c9
mov dword [eax + ebx], esi
add ecx, 4
mov dword [edi + 4], ecx
mov eax, dword [esp + 0x44]
add esi, eax
dec esi
inc esi
cmp esi, dword [esp + 0x1c]
jae 0x43db78
mov dword [esp + 4], ecx
test ebp, ebp
je 0x43d941
movzx ecx, byte [ebp]
mov byte [esp + 0x10], 0xa5
mov dword [esp + 0x11], 0
mov edx, 0x8c500d9
nop
nop
movzx eax, byte [esp + edx - 0x8c500c9]
mov ebx, eax
not ebx
or ebx, edx
add bl, bl
add bl, al
neg bl
movzx eax, bl
add eax, edx
add al, 0xc1
mov byte [esp + edx - 0x8c500c9], al
inc edx
cmp edx, 0x8c500de
jne 0x43d910
cmp cl, byte [esp + 0x10]
je 0x43d94c
movzx eax, byte [esi]
mov ecx, dword [esp + 0x40]
cmp al, byte [ecx]
jne 0x43d9c0
cmp dword [esp + 0x44], 2
jb 0x43d8c0
mov ecx, 1
jmp 0x43d97c
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x40]
cmp al, byte [edx + ecx]
jne 0x43dadf
inc ecx
cmp ecx, dword [esp + 0x44]
je 0x43d8c0
test ebp, ebp
je 0x43d960
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x10], 0xff
lea eax, [esp + 0x11]
mov dword [eax + 3], 0
mov dword [eax], 0
xor ebx, ebx
nop
nop
nop
mov eax, ebx
add al, 0x20
xor al, byte [esp + ebx + 0x10]
add al, 0x60
mov byte [esp + ebx + 0x10], al
inc ebx
cmp ebx, 8
jne 0x43d9a0
cmp dl, byte [esp + 0x10]
jne 0x43d960
jmp 0x43d971
mov ecx, dword [esp + 4]
jmp 0x43d8e5
mov edx, ebx
sar edx, 2
lea eax, [edx + 1]
mov ecx, edx
shr ecx, 1
add ecx, edx
cmp ecx, eax
ja 0x43d9dd
mov ecx, eax
mov eax, ecx
and eax, 0xfffffffb
mov edi, ecx
and edi, 4
mov edx, ecx
mov dword [esp + 0xc], ecx
or edx, 4
imul edx, edi
xor edi, 4
imul edi, eax
add edx, edi
push edx
call fcn.004083f0
add esp, 4
mov ebp, eax
mov edx, dword [esp]
test edx, edx
mov edi, dword [esp + 0x34]
je 0x43db50
cmp ebp, edx
mov eax, dword [esp + 4]
mov dword [esp + 8], ebx
mov dword [esp + 0x18], ebp
jbe 0x43daf6
cmp eax, ebp
jbe 0x43daf6
test ebx, ebx
je 0x43db39
mov edx, dword [esp + 8]
mov eax, dword [esp + 0x18]
add eax, edx
dec eax
mov ecx, dword [esp]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x43da74
neg edi
xor edx, edx
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x43da60
add ecx, edx
add eax, edx
add edx, dword [esp + 8]
mov edi, dword [esp]
sub edi, dword [esp + 4]
cmp edi, 0xfffffff8
ja 0x43db39
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 0x43da90
jmp 0x43db39
mov eax, ecx
not eax
and eax, 1
and ecx, 0xfffffffe
sub ecx, eax
add esi, ecx
mov ecx, dword [esp + 4]
jmp 0x43d8e5
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov edi, ebp
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov ecx, ebx
not ecx
or ecx, 0xfffffffc
add ecx, ebx
add ebp, ecx
inc ebp
add edx, ecx
inc edx
mov ecx, ebx
shr ecx, 1
and ecx, 1
mov eax, ebx
mov ebx, edx
mov edi, ebp
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test al, 1
je 0x43db39
mov ecx, dword [esp + 8]
and ecx, 2
movzx edx, byte [edx + ecx]
mov byte [ebp + ecx], dl
push dword [esp]
call fcn.00408400
add esp, 4
mov edi, dword [esp + 0x34]
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x18]
mov dword [edi], ebp
mov eax, dword [esp + 0xc]
lea eax, [eax*4]
add eax, ebp
mov ecx, ebp
add ecx, ebx
mov dword [esp + 0xc], eax
mov dword [edi + 8], eax
mov eax, ebp
mov dword [esp], ebp
mov ebp, dword [esp + 0x48]
jmp 0x43d8d5
mov eax, edi
add esp, 0x20
pop esi
pop edi
pop ebx
pop ebp
ret