Function at 0x4161a0
Capabilities:
Encode data using xor

Disassembly:
push ecx
push ebx
push ebp
push esi
push edi
mov edi, dword [esp + 0x1c]
mov ebp, ecx
mov ecx, edi
xor eax, eax
mov esi, dword [esp + 0x18]
mov dword [esp + 0x10], ebp
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], eax
mov al, byte [esi]
test al, 1
je 0x4161c2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov ecx, dword [esi + 0xc]
mov ebx, dword [esi + 8]
mov eax, dword [esi + 4]
mov edx, ecx
sub edx, ebx
cmp edx, eax
je 0x41640e
mov al, byte [ecx]
inc ecx
test al, 0x80
mov dword [esi + 0xc], ecx
jne 0x416240
mov cl, byte [esi + 0x14]
test cl, cl
jne 0x4161f2
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov byte [edi + 5], al
mov al, cl
and al, 0xf0
mov byte [edi + 4], cl
cmp al, 0xc0
mov dword [edi + 8], 2
je 0x4163f2
cmp al, 0xd0
je 0x4163f2
mov eax, dword [esi + 0xc]
mov ebx, dword [esi + 8]
mov edx, dword [esi + 4]
mov ecx, eax
sub ecx, ebx
cmp ecx, edx
je 0x41640e
mov dl, byte [eax]
mov byte [edi + 6], dl
mov eax, dword [esi + 0xc]
inc eax
mov dword [esi + 0xc], eax
mov eax, dword [edi + 8]
inc eax
mov dword [edi + 8], eax
jmp 0x4163f2
mov cl, al
and cl, 0xf0
cmp cl, 0xf0
je 0x4162b7
mov byte [edi + 4], al
cmp cl, 0xc0
mov byte [esi + 0x14], al
je 0x41625f
cmp cl, 0xd0
mov ecx, 2
jne 0x416264
mov ecx, 1
lea eax, [ecx + 1]
mov dword [edi + 8], eax
mov eax, dword [esi + 0xc]
mov ebx, dword [esi + 8]
mov edx, eax
sub edx, ebx
mov ebx, dword [esi + 4]
cmp edx, ebx
je 0x41640e
mov al, byte [eax]
mov byte [edi + 5], al
mov eax, dword [esi + 0xc]
inc eax
cmp ecx, 2
mov dword [esi + 0xc], eax
jne 0x4163f2
mov ebx, dword [esi + 8]
mov edx, dword [esi + 4]
mov ecx, eax
sub ecx, ebx
cmp ecx, edx
je 0x41640e
mov dl, byte [eax]
mov byte [edi + 6], dl
mov eax, dword [esi + 0xc]
inc eax
mov dword [esi + 0xc], eax
jmp 0x4163f2
cmp al, 0xf0
je 0x41637c
cmp al, 0xf7
je 0x41637c
cmp al, 0xff
jne 0x41640e
mov byte [edi + 4], al
mov eax, dword [esi + 0xc]
mov ebx, dword [esi + 8]
mov edx, dword [esi + 4]
mov ecx, eax
sub ecx, ebx
cmp ecx, edx
je 0x41640e
mov dl, byte [eax]
lea ebx, [edi + 8]
mov byte [edi + 5], dl
mov eax, dword [esi + 0xc]
inc eax
push ebx
push esi
mov ecx, ebp
mov dword [esi + 0xc], eax
call fcn.00416440
test eax, eax
jne 0x41630b
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
mov eax, dword [ebx]
test eax, eax
je 0x41636e
push eax
call fcn.0042ba8f
add esp, 4
mov dword [edi + 0xc], eax
test eax, eax
jne 0x416329
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
mov edx, dword [ebp + 0x9c]
xor eax, eax
inc edx
mov dword [ebp + 0x9c], edx
mov ecx, dword [ebx]
test ecx, ecx
jbe 0x41636e
mov ebp, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov ecx, ebp
sub ecx, edx
mov edx, dword [esi + 4]
cmp ecx, edx
je 0x41640e
mov edx, dword [edi + 0xc]
mov cl, byte [ebp]
mov byte [eax + edx], cl
mov ebp, dword [esi + 0xc]
inc ebp
inc eax
mov dword [esi + 0xc], ebp
mov ecx, dword [ebx]
cmp eax, ecx
jb 0x41633e
mov ebp, dword [esp + 0x10]
cmp byte [edi + 5], 0x2f
jne 0x4163f2
mov eax, dword [esi]
or al, 1
mov dword [esi], eax
jmp 0x4163f2
lea ebx, [edi + 8]
mov ecx, ebp
push ebx
push esi
mov byte [edi + 4], al
call fcn.00416440
test eax, eax
jne 0x416397
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
mov edx, dword [ebx]
push edx
call fcn.0042ba8f
add esp, 4
mov dword [edi + 0xc], eax
test eax, eax
jne 0x4163b1
pop edi
pop esi
pop ebp
pop ebx
pop ecx
ret 8
mov edx, dword [ebp + 0x9c]
xor eax, eax
inc edx
mov dword [ebp + 0x9c], edx
mov ecx, dword [ebx]
test ecx, ecx
jbe 0x4163f2
mov ebp, dword [esi + 0xc]
mov edx, dword [esi + 8]
mov ecx, ebp
sub ecx, edx
mov edx, dword [esi + 4]
cmp ecx, edx
je 0x41640e
mov edx, dword [edi + 0xc]
mov cl, byte [ebp]
mov byte [eax + edx], cl
mov ebp, dword [esi + 0xc]
inc ebp
inc eax
mov dword [esi + 0xc], ebp
mov ecx, dword [ebx]
cmp eax, ecx
jb 0x4163c6
mov ebp, dword [esp + 0x10]
mov edx, dword [esi + 0x10]
mov dword [edi], edx
mov al, byte [esi]
test al, 1
jne 0x416424
lea eax, [esp + 0x1c]
mov ecx, ebp
push eax
push esi
call fcn.00416440
test eax, eax
jne 0x416418
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
pop ecx
ret 8
mov ecx, dword [esp + 0x1c]
mov eax, dword [esi + 0x10]
add eax, ecx
mov dword [esi + 0x10], eax
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
pop ecx
ret 8