Function at 0x100876e0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0xc4
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0xc0], eax
mov eax, dword [ebp + 0x10]
mov ecx, dword [ebp + 0x20]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
push edi
mov edi, dword [ebp + 8]
xor esi, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x28], ebx
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x18], esi
mov dword [esp + 0x20], esi
call sym.inicrypto_v5.4.1.dll_ISC_Crypto_Initialize
cmp eax, esi
jne 0x10087a45
mov esi, dword [ebp + 0x1c]
and esi, 0xfffffff
cmp esi, 0x5000400
mov dword [esp + 0x24], esi
jg 0x10087757
je 0x10087786
cmp esi, 0x5000200
je 0x10087786
cmp esi, 0x5000300
jmp 0x1008775d
cmp esi, 0x5000500
je 0x10087786
mov dl, byte [0x100fd914]
cmp dl, 1
jne 0x10087786
mov esi, 0x260100f0
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.10087a66
mov esp, ebp
pop ebp
ret
test edi, edi
je 0x10087a40
cmp dword [esp + 0x10], 0
je 0x10087a40
cmp dword [ebp + 0x18], 0
je 0x10087a40
push 0x40
lea eax, [esp + 0x4c]
push 0
push eax
call fcn.1008e320
push esi
call sym.inicrypto_v5.4.1.dll_ISC_Get_DIGEST_Length
mov esi, eax
add esp, 0x10
test esi, esi
jge 0x100877da
mov eax, 0x2601002b
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.10087a66
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + 0x24]
mov eax, ecx
cdq
idiv esi
mov edi, eax
xor eax, eax
test edx, edx
setne al
add eax, edi
mov dword [esp + 0x1c], eax
dec eax
imul eax, esi
sub ecx, eax
mov dword [esp + 0x2c], ecx
js 0x100877c0
lea eax, [ebx + 4]
push eax
mov dword [esp + 0x38], eax
call fcn.10087e65
mov edi, eax
add esp, 4
mov dword [esp + 0x14], edi
test edi, edi
jne 0x10087821
mov esi, 0x2601003b
jmp 0x10087a08
mov ecx, dword [esp + 0x10]
push ebx
push ecx
push edi
call fcn.1008d020
add esp, 0xc
call sym.inicrypto_v5.4.1.dll_ISC_New_HMAC_Unit
mov edi, eax
test edi, edi
jne 0x10087845
mov esi, 0x2601003c
jmp 0x100879f1
mov ebx, 1
cmp dword [esp + 0x1c], ebx
jl 0x100879ef
mov eax, dword [esp + 0x28]
mov esi, dword [esp + 0x14]
lea edx, [eax + esi + 1]
mov dword [esp + 0x38], edx
lea ecx, [eax + esi + 2]
lea edx, [eax + esi + 3]
mov dword [esp + 0x40], ecx
mov dword [esp + 0x44], edx
jmp 0x1008787e
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x28]
mov ecx, ebx
sar ecx, 0x18
mov byte [eax + esi], cl
mov eax, dword [esp + 0x38]
mov edx, ebx
sar edx, 0x10
mov byte [eax], dl
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x44]
mov ecx, ebx
sar ecx, 8
mov byte [edx], cl
mov ecx, dword [ebp + 0xc]
mov edx, dword [esp + 0x30]
push ecx
mov byte [eax], bl
mov eax, dword [esp + 0x28]
push edx
push eax
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Init_HMAC
add esp, 0x10
test eax, eax
jne 0x10087a39
mov ecx, dword [esp + 0x34]
push ecx
push esi
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Update_HMAC
add esp, 0xc
test eax, eax
jne 0x10087a39
lea edx, [esp + 0x18]
push edx
lea eax, [esp + 0x4c]
push eax
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Final_HMAC
add esp, 0xc
test eax, eax
jne 0x10087a39
push 0x40
push eax
lea ecx, [esp + 0x90]
push ecx
call fcn.1008e320
mov esi, dword [esp + 0x24]
add esp, 0xc
xor eax, eax
test esi, esi
jle 0x10087920
mov dl, byte [esp + eax + 0x48]
xor byte [esp + eax + 0x88], dl
inc eax
cmp eax, esi
jl 0x10087910
mov eax, 1
cmp dword [ebp + 0x18], eax
mov dword [esp + 0x10], eax
jle 0x100879ae
mov eax, dword [ebp + 0xc]
mov ecx, dword [esp + 0x30]
mov edx, dword [esp + 0x24]
push eax
push ecx
push edx
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Init_HMAC
add esp, 0x10
test eax, eax
jne 0x10087a39
push esi
lea eax, [esp + 0x4c]
push eax
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Update_HMAC
add esp, 0xc
test eax, eax
jne 0x10087a39
lea ecx, [esp + 0x18]
push ecx
lea edx, [esp + 0x4c]
push edx
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Final_HMAC
add esp, 0xc
test eax, eax
jne 0x10087a39
mov esi, dword [esp + 0x18]
test esi, esi
jle 0x100879a0
jmp 0x10087990
mov cl, byte [esp + eax + 0x48]
xor byte [esp + eax + 0x88], cl
inc eax
cmp eax, esi
jl 0x10087990
mov eax, dword [esp + 0x10]
inc eax
cmp eax, dword [ebp + 0x18]
mov dword [esp + 0x10], eax
jl 0x10087932
mov eax, dword [esp + 0x2c]
cmp ebx, dword [esp + 0x1c]
je 0x100879ba
mov eax, esi
mov ecx, dword [esp + 0x20]
push eax
mov eax, dword [esp + 0x40]
lea edx, [esp + 0x8c]
push edx
add eax, ecx
push eax
call fcn.1008d020
mov eax, dword [esp + 0x28]
add esp, 0xc
cmp ebx, eax
jne 0x100879e2
mov esi, dword [esp + 0x2c]
add dword [esp + 0x20], esi
inc ebx
cmp ebx, eax
jle 0x10087876
xor esi, esi
test edi, edi
je 0x10087a04
push edi
call sym.inicrypto_v5.4.1.dll_ISC_Clean_HMAC_Unit
push edi
call fcn.10087d88
add esp, 8
mov edi, dword [esp + 0x14]
test edi, edi
je 0x10087a22
mov edx, dword [esp + 0x34]
push edx
push 0
push edi
call fcn.1008e320
push edi
call fcn.10087d88
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0xc0]
xor ecx, esp
call fcn.10087a66
mov esp, ebp
pop ebp
ret
mov esi, 0x2601004c
jmp 0x100879f1
mov eax, 0x26010049
mov ecx, dword [esp + 0xcc]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.10087a66
mov esp, ebp
pop ebp
ret