Function at 0x66b870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
sub esp, 0x1c
mov ebx, dword [ebp + 8]
mov eax, dword [ebx]
mov ecx, dword [eax + 0x20]
test ecx, ecx
je 0x66b894
call dword [0x73c768]
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
jmp ecx
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x18], eax
mov esi, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x1c], eax
push ebx
call fcn.0049cc00
add esp, 4
cmp eax, esi
jbe 0x66b8e9
push 0x1de
push 0x6e076a
push 0x87
push 0
push 4
call fcn.006325a0
add esp, 0x14
xor ebx, ebx
mov eax, ebx
add esp, 0x1c
pop esi
pop edi
pop ebx
pop ebp
ret
mov edi, eax
mov esi, dword [ebp - 0x20]
cmp dword [ebp - 0x10], 3
je 0x66b903
push edi
call fcn.004f73e0
add esp, 4
mov esi, eax
test eax, eax
je 0x66b937
mov eax, dword [ebp - 0x14]
cmp edi, eax
je 0x66b93d
push 0x1ed
push 0x6e076a
push 0x70
push 0
push 4
call fcn.006325a0
add esp, 0x14
xor ebx, ebx
mov edi, dword [ebp - 0x10]
cmp edi, 3
je 0x66b8df
push esi
call fcn.004f7480
add esp, 4
jmp 0x66b8df
xor ebx, ebx
xor esi, esi
jmp 0x66b92c
push eax
push dword [ebp - 0x18]
push esi
push ebx
call fcn.005ceaf0
add esp, 0x10
xor ebx, ebx
test eax, eax
mov edi, dword [ebp - 0x10]
je 0x66b927
cmp edi, 1
je 0x66b996
cmp edi, 3
mov eax, dword [ebp - 0x14]
je 0x66b989
cmp edi, 4
je 0x66bab2
push 0x204
push 0x6e076a
push 0x8f
push 0
push 4
call fcn.006325a0
add esp, 0x14
xor ebx, ebx
jmp 0x66b92c
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], eax
xor ebx, ebx
inc ebx
jmp 0x66b8df
mov ecx, dword [ebp - 0x14]
test ecx, ecx
je 0x66b9b0
cmp ecx, 0xa
ja 0x66b9e8
push 0x127
push 0x6e076a
push 0x7e
jmp 0x66b9bc
push 0x11e
push 0x6e076a
push pe_nt_image_headers32
push 0
push 4
call fcn.006325a0
add esp, 0x14
push 0x20a
push 0x6e076a
push 0x88
push 0
push 4
call fcn.006325a0
add esp, 0x14
jmp 0x66b927
movzx eax, byte [esi]
mov dword [ebp - 0x28], eax
movzx eax, byte [esi + 1]
xor eax, 2
mov dword [ebp - 0x24], eax
xor eax, eax
xor ecx, ecx
dec ecx
mov ebx, 2
mov dword [ebp - 0x18], esi
mov edx, eax
mov esi, ecx
mov eax, dword [ebp - 0x18]
movzx ecx, byte [eax + ebx]
dec ecx
sar ecx, 0x1f
mov edi, ecx
and edi, esi
mov eax, ebx
xor eax, edx
and eax, edi
xor eax, edx
not ecx
and ecx, esi
inc ebx
cmp dword [ebp - 0x14], ebx
jne 0x66ba05
mov esi, dword [ebp - 0x18]
mov edx, 9
sub edx, eax
or edx, eax
mov ebx, 0
jns 0x66ba6d
mov edx, dword [ebp - 0x28]
dec edx
mov edi, dword [ebp - 0x24]
dec edi
and edi, edx
jns 0x66ba6d
cmp ecx, 0xffffffff
je 0x66ba6d
inc eax
mov ecx, dword [ebp - 0x14]
sub ecx, eax
mov edi, dword [ebp - 0x10]
jae 0x66ba90
push 0x154
push 0x6e076a
push 0x89
jmp 0x66b9bc
push 0x14c
push 0x6e076a
push 0x89
push 0
push 4
call fcn.006325a0
add esp, 0x14
mov edi, dword [ebp - 0x10]
jmp 0x66b9c8
je 0x66baa5
add eax, esi
push ecx
push eax
push dword [ebp - 0x20]
mov ebx, ecx
call fcn.00543ce0
mov ecx, ebx
add esp, 0xc
mov eax, dword [ebp - 0x1c]
mov dword [eax], ecx
xor ebx, ebx
inc ebx
jmp 0x66b927
sub esp, 0x24
xorps xmm0, xmm0
movups xmmword [esp + 0x14], xmm0
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call fcn.0066b2a0
add esp, 0x24
test eax, eax
je 0x66b9c8
xor ebx, ebx
inc ebx
jmp 0x66b92c