Function at 0x10176170
Capabilities:
Encode data using xor

Disassembly:
push 0xffffffffffffffff
push 0x101aa96b
mov eax, dword fs:[0]
push eax
sub esp, 0x13c
mov eax, dword [0x1026d48c]
xor eax, esp
mov dword [esp + 0x138], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x1026d48c]
xor eax, esp
push eax
lea eax, [esp + 0x150]
mov dword fs:[0], eax
mov esi, dword [esp + 0x168]
mov edi, dword [esp + 0x164]
mov ebp, dword [esp + 0x16c]
lea ecx, [esp + 0x18]
mov dword [esp + 0x14], esi
call fcn.1002a630
lea ebx, [esi + 0x34]
mov ecx, ebx
mov dword [esp + 0x158], 0
call fcn.100f6330
test eax, eax
jne 0x101761f7
push 0x10
push eax
mov ecx, ebx
call fcn.10019090
mov dword [esi + 0x30], 0xc
cmp dword [edi + 0x534], 0
je 0x10176214
mov eax, dword [ebp]
mov edx, dword [eax + 0x14]
push str.Not_in_IV_mode.
mov ecx, ebp
call edx
jmp 0x1017641c
mov eax, dword [edi + 0x538]
cmp eax, 0x10
jge 0x1017640d
test eax, eax
jl 0x1017640d
mov ecx, dword [esi + 0x30]
add ecx, eax
cmp ecx, 0xc
jbe 0x1017623c
or dword [edi + 0x530], 1
mov ecx, ebx
call fcn.1008bea0
xor ebp, ebp
cmp dword [edi + 0x538], ebp
mov ebx, eax
jne 0x101762b5
test dword [esi + 0x30], 0xfffffff0
jbe 0x101762b3
lea esi, [edi + 0x4f0]
mov edi, edi
mov edx, dword [ebx + ebp]
xor dword [esi], edx
mov eax, dword [ebx + ebp + 4]
xor dword [esi + 4], eax
mov ecx, dword [ebx + ebp + 8]
xor dword [edi + 0x4f8], ecx
mov edx, dword [ebx + ebp + 0xc]
xor dword [edi + 0x4fc], edx
lea eax, [esp + 0x18]
push eax
mov eax, edi
call fcn.10173900
mov ecx, dword [esp + 0x18]
add esp, 4
add dword [edi + 0x540], 0x80
adc dword [edi + 0x544], 0
mov edx, dword [ecx + 0x30]
add ebp, 0x10
and edx, 0xfffffff0
cmp ebp, edx
jb 0x10176260
mov esi, ecx
add ebx, ebp
cmp ebp, dword [esi + 0x30]
jae 0x101763f5
mov edi, edi
mov eax, dword [edi + 0x538]
mov cl, byte [ebx]
mov byte [eax + edi + 0x520], cl
add dword [edi + 0x538], 1
mov eax, dword [edi + 0x538]
add ebx, 1
cmp eax, 0x10
jne 0x101763e9
movzx edx, byte [edi + 0x520]
movzx eax, byte [edi + 0x521]
xor byte [edi + 0x4f1], al
xor byte [edi + 0x4f0], dl
movzx ecx, byte [edi + 0x522]
movzx edx, byte [edi + 0x523]
movzx eax, byte [edi + 0x524]
xor byte [edi + 0x4f4], al
xor byte [edi + 0x4f2], cl
xor byte [edi + 0x4f3], dl
movzx ecx, byte [edi + 0x525]
movzx edx, byte [edi + 0x526]
movzx eax, byte [edi + 0x527]
xor byte [edi + 0x4f7], al
xor byte [edi + 0x4f5], cl
xor byte [edi + 0x4f6], dl
movzx ecx, byte [edi + 0x528]
movzx edx, byte [edi + 0x529]
movzx eax, byte [edi + 0x52a]
xor byte [edi + 0x4fa], al
xor byte [edi + 0x4f8], cl
xor byte [edi + 0x4f9], dl
movzx ecx, byte [edi + 0x52b]
movzx edx, byte [edi + 0x52c]
movzx eax, byte [edi + 0x52d]
xor byte [edi + 0x4fd], al
xor byte [edi + 0x4fb], cl
xor byte [edi + 0x4fc], dl
movzx ecx, byte [edi + 0x52e]
movzx edx, byte [edi + 0x52f]
xor byte [edi + 0x4fe], cl
xor byte [edi + 0x4ff], dl
lea esi, [edi + 0x4f0]
lea eax, [esp + 0x18]
push eax
mov eax, edi
call fcn.10173900
mov esi, dword [esp + 0x18]
xor eax, eax
add esp, 4
add dword [edi + 0x540], 0x80
mov dword [edi + 0x538], eax
adc dword [edi + 0x544], eax
add ebp, 1
cmp ebp, dword [esi + 0x30]
jb 0x101762c0
lea ecx, [esp + 0x18]
mov dword [esp + 0x158], 0xffffffff
call fcn.1002a650
mov al, 1
jmp 0x10176432
mov edx, dword [ebp]
mov eax, dword [edx + 0x14]
push str.buflen_error.
mov ecx, ebp
call eax
lea ecx, [esp + 0x18]
mov dword [esp + 0x158], 0xffffffff
call fcn.1002a650
xor al, al
mov ecx, dword [esp + 0x150]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x138]
xor ecx, esp
call fcn.1018f87e
add esp, 0x148
ret 0x10