Function at 0x43d080
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x24
mov edi, dword [esp + 0x38]
mov esi, dword [esp + 0x3c]
mov eax, dword [esp + 0x40]
add eax, esi
sub eax, dword [esp + 0x48]
mov dword [edi + 8], 0
mov dword [edi + 4], 0
mov dword [edi], 0
mov dword [esp + 0x20], eax
cmp eax, esi
jbe 0x43d41c
mov ebp, dword [esp + 0x4c]
xor ecx, ecx
mov dword [esp], 0
mov dword [esp + 0xc], 0
jmp 0x43d100
mov ecx, dword [esp + 4]
mov ebx, ecx
mov eax, dword [esp]
sub ebx, eax
cmp ecx, dword [esp + 0xc]
je 0x43d1e9
mov dword [eax + ebx], esi
add ecx, 4
mov dword [edi + 4], ecx
mov eax, dword [esp + 0x48]
add esi, eax
dec esi
inc esi
cmp esi, dword [esp + 0x20]
jae 0x43d41c
mov dword [esp + 4], ecx
test ebp, ebp
je 0x43d14d
movzx ecx, byte [ebp]
mov byte [esp + 0x18], 0x85
mov dword [esp + 0x19], 0
mov edx, 0x9b7d018f
nop
nop
movzx eax, byte [esp + edx + 0x6482fe89]
mov ebx, eax
and ebx, edx
add bl, bl
sub al, bl
movzx eax, al
add eax, edx
add al, 0x35
mov byte [esp + edx + 0x6482fe89], al
inc edx
cmp edx, 0x9b7d0194
jne 0x43d120
cmp cl, byte [esp + 0x18]
je 0x43d15c
movzx eax, byte [esi]
mov ecx, dword [esp + 0x44]
cmp al, byte [ecx]
jne 0x43d1e0
cmp dword [esp + 0x48], 2
jb 0x43d0d0
mov ecx, 1
jmp 0x43d18c
movzx eax, byte [esi + ecx]
mov edx, dword [esp + 0x44]
cmp al, byte [edx + ecx]
jne 0x43d302
inc ecx
cmp ecx, dword [esp + 0x48]
je 0x43d0d0
test ebp, ebp
je 0x43d170
movzx edx, byte [ebp + ecx]
mov byte [esp + 0x10], 0xdb
lea eax, [esp + 0x11]
mov byte [eax + 2], 0
mov word [eax], 0
xor ebx, ebx
nop
nop
nop
nop
nop
nop
nop
mov eax, ebx
add al, 0x26
xor al, byte [esp + ebx + 0x10]
add al, 0x42
mov byte [esp + ebx + 0x10], al
mov eax, ebx
xor eax, 1
and ebx, 1
lea ebx, [eax + ebx*2]
cmp ebx, 4
jb 0x43d1b0
cmp dl, byte [esp + 0x10]
jne 0x43d170
jmp 0x43d181
mov ecx, dword [esp + 4]
jmp 0x43d0f5
mov edx, ebx
sar edx, 2
mov ecx, ebx
shr ecx, 1
and ecx, 2
mov eax, edx
shr eax, 1
add eax, edx
xor edx, 1
add edx, ecx
cmp eax, edx
ja 0x43d206
mov eax, edx
mov edi, eax
and edi, 0xfffffffb
mov ecx, eax
and ecx, 4
mov dword [esp + 0xc], eax
or eax, 4
imul eax, ecx
xor ecx, 4
imul ecx, edi
add eax, ecx
push eax
call fcn.00408580
add esp, 4
mov ebp, eax
mov edx, dword [esp]
test edx, edx
mov edi, dword [esp + 0x38]
je 0x43d3f4
cmp ebp, edx
mov eax, dword [esp + 4]
mov dword [esp + 8], ebx
mov dword [esp + 0x14], ebp
jbe 0x43d30e
cmp eax, ebp
jbe 0x43d30e
test ebx, ebx
je 0x43d3dd
mov eax, dword [esp]
mov edx, dword [esp + 8]
add eax, edx
dec eax
mov ecx, dword [esp + 0x14]
add ecx, edx
dec ecx
mov edi, edx
and edi, 7
je 0x43d294
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 0x43d280
add eax, edx
add ecx, edx
add edx, dword [esp + 8]
mov edi, dword [esp]
sub edi, dword [esp + 4]
cmp edi, 0xfffffff8
ja 0x43d3dd
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 0x43d2b0
jmp 0x43d3dd
add esi, ecx
dec esi
mov ecx, dword [esp + 4]
jmp 0x43d0f5
mov ecx, ebx
shr ecx, 2
mov eax, edx
mov dword [esp], edx
mov edi, ebp
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov edx, ebx
and edx, 0xfffffffc
lea eax, [edx + ebp]
add edx, dword [esp]
and ebx, 3
mov ebp, ebx
not ebp
or ebp, 1
add ebp, ebx
mov ecx, ebx
shr ecx, 1
mov ebx, edx
mov edi, eax
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
mov dword [esp + 4], ebp
inc ebp
je 0x43d3dd
mov edi, dword [esp + 8]
and edi, 2
add edx, edi
add eax, edi
mov ebx, ebp
and ebx, 7
je 0x43d382
xor edi, edi
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ecx, byte [edx + edi]
mov byte [eax + edi], cl
inc edi
cmp ebx, edi
jne 0x43d370
add edx, edi
add eax, edi
sub ebp, edi
cmp dword [esp + 4], 7
jb 0x43d3dd
xor edi, edi
nop
nop
nop
nop
nop
movzx ecx, byte [edx + edi]
mov byte [eax + edi], cl
movzx ecx, byte [edx + edi + 1]
mov byte [eax + edi + 1], cl
movzx ecx, byte [edx + edi + 2]
mov byte [eax + edi + 2], cl
movzx ecx, byte [edx + edi + 3]
mov byte [eax + edi + 3], cl
movzx ecx, byte [edx + edi + 4]
mov byte [eax + edi + 4], cl
movzx ecx, byte [edx + edi + 5]
mov byte [eax + edi + 5], cl
movzx ecx, byte [edx + edi + 6]
mov byte [eax + edi + 6], cl
movzx ecx, byte [edx + edi + 7]
mov byte [eax + edi + 7], cl
add edi, 8
cmp ebp, edi
jne 0x43d390
push dword [esp]
call fcn.00408590
add esp, 4
mov edi, dword [esp + 0x38]
mov ebx, dword [esp + 8]
mov ebp, dword [esp + 0x14]
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 + 0x4c]
jmp 0x43d0e5
mov eax, edi
add esp, 0x24
pop esi
pop edi
pop ebx
pop ebp
ret