Function at 0xd7870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffe98
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x48], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0xc], ecx
mov byte [ebp - 5], dl
mov dword [ebp - 4], eax
xor eax, eax
push ebp
push 0xd7d91
push dword fs:[eax]
mov dword fs:[eax], esp
mov eax, dword [0xfb140]
cmp byte [eax], 0
jne 0xd78b7
call fcn.000cd058
mov byte [0xfaff0], 0
xor eax, eax
call fcn.000ccf64
mov byte [ebp - 0x2c], al
call fcn.000cd3f4
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 1
je 0xd78d9
cmp dword [ebp - 0x14], 2
jne 0xd79cd
cmp byte [0xfaff0], 0
je 0xd78f0
mov al, byte [0xfaffc]
cmp al, byte [ebp - 0x2c]
je 0xd79cd
cmp byte [ebp - 5], 4
jne 0xd79cd
mov al, byte [ebp - 0x2c]
mov byte [0xfaffc], al
lea eax, [ebp - 0x18]
call fcn.000b9d90
mov eax, dword [ebp - 0x18]
call fcn.00013ef8
test eax, eax
jle 0xd79cd
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x18]
call fcn.0006a8c4
lea eax, [ebp - 0x1c]
call fcn.00079848
cmp dword [ebp - 0x14], 2
jne 0xd794c
mov byte [ebp - 0x2b], 0
xor eax, eax
mov al, byte [ebp - 0x2b]
mov dl, byte [ebp - 0x2c]
xor byte [ebp + eax - 0x58], dl
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd7937
cmp dword [ebp - 0x14], 1
je 0xd7958
cmp dword [ebp - 0x14], 2
jne 0xd7986
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
call fcn.0006a8c4
push ebp
lea ecx, [ebp - 0x168]
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x58]
call fcn.000d7784
pop ecx
lea esi, [ebp - 0x168]
lea edi, [ebp - 0x58]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 0x2b], 0
mov al, byte [ebp - 0x2b]
shl eax, 4
mov byte [ebp - 0x2d], al
xor eax, eax
mov al, byte [ebp - 0x2d]
lea edx, [ebp + eax - 0x158]
lea eax, [ebp - 0x58]
mov ecx, 0x10
call fcn.00012824
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd798a
push ebp
lea eax, [ebp - 0x158]
call fcn.000d769c
pop ecx
mov al, byte [ebp - 0x154]
mov byte [0xfaff0], al
cmp dword [ebp - 0x14], 1
je 0xd79dd
cmp dword [ebp - 0x14], 2
jne 0xd7ad1
cmp byte [0xfaff4], 0
je 0xd79f4
mov al, byte [0xfaff8]
cmp al, byte [ebp - 0x2c]
je 0xd7ad1
cmp byte [ebp - 5], 5
jne 0xd7ad1
mov al, byte [ebp - 0x2c]
mov byte [0xfaff8], al
lea eax, [ebp - 0x18]
call fcn.000b9d90
mov eax, dword [ebp - 0x18]
call fcn.00013ef8
test eax, eax
jle 0xd7ad1
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x18]
call fcn.0006a8c4
lea eax, [ebp - 0x1c]
call fcn.00079848
cmp dword [ebp - 0x14], 2
jne 0xd7a50
mov byte [ebp - 0x2b], 0
xor eax, eax
mov al, byte [ebp - 0x2b]
mov dl, byte [ebp - 0x2c]
xor byte [ebp + eax - 0x58], dl
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd7a3b
cmp dword [ebp - 0x14], 1
je 0xd7a5c
cmp dword [ebp - 0x14], 2
jne 0xd7a8a
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
call fcn.0006a8c4
push ebp
lea ecx, [ebp - 0x168]
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x58]
call fcn.000d7784
pop ecx
lea esi, [ebp - 0x168]
lea edi, [ebp - 0x58]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 0x2b], 0
mov al, byte [ebp - 0x2b]
shl eax, 4
mov byte [ebp - 0x2d], al
xor eax, eax
mov al, byte [ebp - 0x2d]
lea edx, [ebp + eax - 0x158]
lea eax, [ebp - 0x58]
mov ecx, 0x10
call fcn.00012824
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd7a8e
push ebp
lea eax, [ebp - 0x158]
call fcn.000d769c
pop ecx
mov al, byte [ebp - 0x153]
mov byte [0xfaff4], al
cmp dword [ebp - 0x14], 1
je 0xd7ae1
cmp dword [ebp - 0x14], 2
jne 0xd7bd5
cmp byte [0xfafec], 0
je 0xd7af8
mov al, byte [0xfb000]
cmp al, byte [ebp - 0x2c]
je 0xd7bd5
cmp byte [ebp - 5], 6
jne 0xd7bd5
mov al, byte [ebp - 0x2c]
mov byte [0xfb000], al
lea eax, [ebp - 0x18]
call fcn.000b9d90
mov eax, dword [ebp - 0x18]
call fcn.00013ef8
test eax, eax
jle 0xd7bd5
lea edx, [ebp - 0x58]
mov eax, dword [ebp - 0x18]
call fcn.0006a8c4
lea eax, [ebp - 0x1c]
call fcn.00079848
cmp dword [ebp - 0x14], 2
jne 0xd7b54
mov byte [ebp - 0x2b], 0
xor eax, eax
mov al, byte [ebp - 0x2b]
mov dl, byte [ebp - 0x2c]
xor byte [ebp + eax - 0x58], dl
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd7b3f
cmp dword [ebp - 0x14], 1
je 0xd7b60
cmp dword [ebp - 0x14], 2
jne 0xd7b8e
lea edx, [ebp - 0x44]
mov eax, dword [ebp - 0x1c]
call fcn.0006a8c4
push ebp
lea ecx, [ebp - 0x168]
lea edx, [ebp - 0x44]
lea eax, [ebp - 0x58]
call fcn.000d7784
pop ecx
lea esi, [ebp - 0x168]
lea edi, [ebp - 0x58]
mov ecx, 4
rep movsd dword es:[edi], dword [esi]
mov byte [ebp - 0x2b], 0
mov al, byte [ebp - 0x2b]
shl eax, 4
mov byte [ebp - 0x2d], al
xor eax, eax
mov al, byte [ebp - 0x2d]
lea edx, [ebp + eax - 0x158]
lea eax, [ebp - 0x58]
mov ecx, 0x10
call fcn.00012824
inc byte [ebp - 0x2b]
cmp byte [ebp - 0x2b], 0x10
jne 0xd7b92
push ebp
lea eax, [ebp - 0x158]
call fcn.000d769c
pop ecx
mov al, byte [ebp - 0x152]
mov byte [0xfafec], al
mov dword [ebp - 0x10], 0xffffffff
cmp dword [ebp - 4], 0
jne 0xd7bee
mov dword [ebp - 0x10], 0x20001001
jmp 0xd7d66
xor eax, eax
push ebp
push 0xd7d55
push dword fs:[eax]
mov dword fs:[eax], esp
cmp dword [ebp - 0x14], 1
je 0xd7c0c
cmp dword [ebp - 0x14], 2
jne 0xd7d4b
lea edx, [ebp - 0x28]
mov eax, dword [ebp - 4]
call fcn.0007a2b0
mov eax, dword [ebp - 0x28]
call fcn.00013ef8
mov word [ebp - 0x2a], ax
cmp word [ebp - 0x2a], 1
jb 0xd7c3c
call fcn.0007e8bc
sub eax, 0xc8
movzx edx, word [ebp - 0x2a]
cmp eax, edx
jge 0xd7c48
mov dword [ebp - 0x10], 0x20001002
jmp 0xd7d4b
cmp byte [ebp - 5], 4
je 0xd7c66
cmp byte [ebp - 5], 6
je 0xd7c66
cmp byte [ebp - 5], 5
je 0xd7c66
mov dword [ebp - 0x10], 0x20001009
jmp 0xd7d4b
call fcn.0007e8bc
mov edx, eax
lea eax, [ebp - 0x34]
call fcn.000763a0
xor eax, eax
push ebp
push 0xd7d44
push dword fs:[eax]
mov dword fs:[eax], esp
lea edx, [ebp - 0x24]
lea eax, [ebp - 0x34]
mov ecx, 4
call fcn.00012824
mov al, byte [ebp - 5]
sub al, 4
je 0xd7ca4
dec al
je 0xd7cb0
dec al
je 0xd7cbc
jmp 0xd7cc6
mov al, byte [0xfaff0]
mov edx, dword [ebp - 0x24]
mov byte [edx], al
jmp 0xd7cc6
mov al, byte [0xfaff4]
mov edx, dword [ebp - 0x24]
mov byte [edx], al
jmp 0xd7cc6
mov al, byte [0xfafec]
mov edx, dword [ebp - 0x24]
mov byte [edx], al
inc dword [ebp - 0x24]
call fcn.00079e70
mov dword [ebp - 0x20], eax
mov edx, dword [ebp - 0x24]
lea eax, [ebp - 0x20]
mov ecx, 4
call fcn.00012824
add dword [ebp - 0x24], 4
mov ax, word [ebp - 0x2a]
and ax, 0xff
mov edx, dword [ebp - 0x24]
mov byte [edx], al
inc dword [ebp - 0x24]
mov ax, word [ebp - 0x2a]
shr ax, 8
mov edx, dword [ebp - 0x24]
mov byte [edx], al
inc dword [ebp - 0x24]
lea eax, [ebp - 0x28]
call fcn.000140c8
movzx ecx, word [ebp - 0x2a]
mov edx, dword [ebp - 0x24]
call fcn.00012824
mov edx, dword [ebp - 0xc]
mov eax, dword [ebp - 0x34]
call fcn.000d71f8
mov dword [ebp - 0x10], eax
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xd7d4b
call fcn.0007e8bc
mov edx, eax
lea eax, [ebp - 0x34]
call fcn.000763dc
ret
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
jmp 0xd7d66
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0xd7d98
lea eax, [ebp - 0x48]
call fcn.00013c78
lea eax, [ebp - 0x28]
call fcn.00013c78
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.00013c9c
ret