Function at 0x43e2d0
Capabilities:
Encode data using xor

Disassembly:
push ebp
push ebx
push edi
push esi
sub esp, 0x28
mov eax, dword [esp + 0x3c]
mov esi, dword [esp + 0x40]
mov ecx, dword [esp + 0x44]
add ecx, esi
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, esi
jbe 0x43e658
mov ebp, dword [esp + 0x50]
xor edx, edx
xor ebx, ebx
mov dword [esp + 0xc], 0
jmp 0x43e343
mov esi, dword [esp + 0x18]
mov dword [ebx + ecx], esi
add edx, 4
mov eax, dword [esp + 0x3c]
mov dword [eax + 4], edx
mov eax, dword [esp + 0x4c]
add esi, eax
dec esi
inc esi
cmp esi, dword [esp + 0x24]
jae 0x43e658
mov dword [esp + 4], edx
mov dword [esp], ebx
test ebp, ebp
je 0x43e3d0
movzx eax, byte [ebp]
mov byte [esp + 0x18], al
mov byte [esp + 0x14], 0xbd
lea eax, [esp + 0x15]
mov byte [eax + 2], 0
mov word [eax], 0
mov edi, 0xbad195
mov eax, 0xa5452e6a
nop
nop
nop
nop
nop
nop
nop
nop
nop
nop
movzx ebx, byte [esp + edi - 0xbad181]
mov edx, eax
and edx, 0xa4040c07
mov ecx, edi
and ecx, 0x801118
or ecx, edx
xor ecx, ebx
mov edx, ecx
and edx, 0x16
xor edx, 6
and ecx, 0xe9
xor ecx, 0x97
add ecx, edx
inc cl
mov byte [esp + edi - 0xbad181], cl
inc edi
dec eax
cmp edi, 0xbad199
jne 0x43e380
movzx eax, byte [esp + 0x18]
cmp al, byte [esp + 0x14]
je 0x43e3df
movzx eax, byte [esi]
mov ecx, dword [esp + 0x48]
cmp al, byte [ecx]
jne 0x43e58d
cmp dword [esp + 0x4c], 2
jb 0x43e460
mov eax, 1
jmp 0x43e408
movzx ecx, byte [esi + eax]
mov edx, dword [esp + 0x48]
cmp cl, byte [edx + eax]
jne 0x43e57f
inc eax
cmp eax, dword [esp + 0x4c]
je 0x43e460
test ebp, ebp
je 0x43e3f0
movzx ecx, byte [ebp + eax]
mov byte [esp + 0x1c], 5
lea edx, [esp + 0x1d]
mov dword [edx + 3], 0
mov dword [edx], 0
xor ebp, ebp
xor edi, edi
nop
nop
nop
nop
nop
mov edx, ebp
and edx, 2
mov ebx, edi
xor ebx, 0x71
add ebx, edx
xor bl, byte [esp + edi + 0x1c]
add bl, 0xcb
mov byte [esp + edi + 0x1c], bl
inc edi
add ebp, 2
cmp edi, 8
jne 0x43e430
cmp cl, byte [esp + 0x1c]
mov ebp, dword [esp + 0x50]
jne 0x43e3f0
jmp 0x43e401
mov dword [esp + 0x18], esi
mov edi, dword [esp + 4]
mov esi, edi
mov ecx, dword [esp]
sub esi, ecx
mov ebx, ecx
mov edx, edi
cmp edi, dword [esp + 0xc]
jne 0x43e60d
mov dword [esp + 8], esi
mov ecx, esi
sar ecx, 2
lea eax, [ecx + 1]
mov edi, ecx
shr edi, 1
add edi, ecx
cmp edi, eax
ja 0x43e495
mov edi, eax
lea eax, [edi*4]
push eax
call fcn.004083e0
add esp, 4
mov ebx, eax
mov ecx, dword [esp]
test ecx, ecx
je 0x43e5ef
mov dword [esp + 0xc], edi
cmp ebx, ecx
mov edx, dword [esp + 8]
mov dword [esp + 0x10], ebx
jbe 0x43e599
cmp dword [esp + 4], ebx
jbe 0x43e599
test edx, edx
je 0x43e5d9
mov edx, dword [esp + 8]
mov eax, edx
and eax, 0xfffffffe
add eax, eax
mov ecx, edx
xor ecx, 1
sub eax, ecx
mov ecx, dword [esp]
add ecx, eax
add eax, dword [esp + 0x10]
mov edi, edx
and edi, 7
je 0x43e514
neg edi
xor edx, edx
nop
nop
movzx ebx, byte [ecx + edx]
mov byte [eax + edx], bl
dec edx
cmp edi, edx
jne 0x43e500
add ecx, edx
add eax, edx
add edx, dword [esp + 8]
mov edi, dword [esp]
sub edi, dword [esp + 4]
cmp edi, 0xfffffff8
ja 0x43e5d9
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 0x43e530
jmp 0x43e5d9
mov ecx, eax
not ecx
and ecx, 1
and eax, 0xfffffffe
sub eax, ecx
add esi, eax
mov ebx, dword [esp]
mov edx, dword [esp + 4]
jmp 0x43e338
mov ecx, edx
shr ecx, 2
mov esi, dword [esp]
mov eax, esi
mov edi, ebx
xchg esi, eax
rep movsd dword es:[edi], dword [esi]
xchg esi, eax
mov eax, edx
and edx, 0xfffffffc
lea ecx, [ebx + edx]
add edx, esi
mov esi, ecx
mov ecx, eax
shr ecx, 1
and ecx, 1
mov ebx, edx
mov edi, esi
xchg esi, ebx
rep movsw word es:[edi], word [esi]
xchg esi, ebx
test al, 1
je 0x43e5d9
mov ecx, dword [esp + 8]
and ecx, 2
movzx edx, byte [edx + ecx]
mov byte [esi + ecx], dl
mov edi, dword [esp]
push edi
call fcn.004083f0
mov ecx, edi
add esp, 4
mov ebx, dword [esp + 0x10]
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 0x3c]
mov dword [eax], ebx
mov esi, dword [esp + 8]
lea edx, [ebx + esi]
mov dword [eax + 4], edx
lea edi, [ebx + edi*4]
mov dword [esp + 0xc], edi
mov dword [eax + 8], edi
mov edi, dword [esp + 4]
mov eax, ecx
xor eax, edi
not ecx
and ecx, edi
add ecx, ecx
sub ecx, eax
cmp ecx, esi
jae 0x43e320
lea ebp, [ebx + ecx]
lea eax, [ebx + ecx]
add eax, 4
mov dword [esp + 0x10], ebx
mov ebx, ebp
mov edi, eax
mov dword [esp], ecx
xor ecx, ecx
xchg esi, ebx
rep movsd dword es:[edi], dword [esi]
xchg esi, ebx
mov ebx, dword [esp + 0x10]
xor ecx, ecx
mov edi, eax
xchg esi, ebp
rep movsw word es:[edi], word [esi]
xchg esi, ebp
mov ecx, dword [esp]
mov ebp, dword [esp + 0x50]
jmp 0x43e320
mov eax, dword [esp + 0x3c]
add esp, 0x28
pop esi
pop edi
pop ebx
pop ebp
ret