Function at 0x8b7870
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14c
push ebx
push esi
mov esi, dword [ebp + 0xc]
cmp esi, 0x100
push edi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x10], ecx
jbe 0x8b7898
mov eax, dword [edi + 0x400]
mov dword [ebp - 0x30], eax
jmp 0x8b789f
mov dword [ebp - 0x30], 0x10
push 0x44
xor ebx, ebx
lea ecx, [ebp - 0x84]
push ebx
push ecx
call fcn.0067e0a0
add esp, 0xc
mov ecx, edi
mov edx, esi
jmp 0x8b78c0
mov eax, dword [ecx]
add dword [ebp + eax*4 - 0x84], 1
lea eax, [ebp + eax*4 - 0x84]
add ecx, 4
sub edx, 1
jne 0x8b78c0
cmp dword [ebp - 0x84], esi
jne 0x8b78f6
mov edx, dword [ebp + 0x1c]
mov eax, dword [ebp + 0x20]
pop edi
mov dword [edx], ebx
mov dword [eax], ebx
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov ecx, 1
jmp 0x8b7900
cmp dword [ebp + ecx*4 - 0x84], ebx
jne 0x8b7911
add ecx, 1
cmp ecx, 0x10
jbe 0x8b7900
mov esi, dword [ebp + 0x20]
cmp dword [esi], ecx
mov edx, ecx
mov dword [ebp - 4], edx
jae 0x8b791f
mov dword [esi], ecx
mov eax, 0x10
cmp dword [ebp + eax*4 - 0x84], ebx
jne 0x8b7932
sub eax, 1
jne 0x8b7924
cmp dword [esi], eax
mov dword [ebp - 0x24], eax
jbe 0x8b793b
mov dword [esi], eax
mov esi, 1
shl esi, cl
cmp ecx, eax
jae 0x8b7966
jmp 0x8b7950
sub esi, dword [ebp + ecx*4 - 0x84]
js 0x8b7b9f
add ecx, 1
add esi, esi
cmp ecx, eax
jb 0x8b7950
mov ecx, dword [ebp + eax*4 - 0x84]
sub esi, ecx
mov dword [ebp - 0x40], esi
js 0x8b7b9f
add ecx, esi
mov dword [ebp + eax*4 - 0x84], ecx
xor ecx, ecx
sub eax, 1
mov dword [ebp - 0x108], ebx
je 0x8b79a3
xor esi, esi
add ecx, dword [ebp + esi - 0x80]
add esi, 4
sub eax, 1
mov dword [ebp + esi - 0x108], ecx
jne 0x8b7990
xor esi, esi
mov eax, dword [edi]
add edi, 4
cmp eax, ebx
je 0x8b79cd
mov ecx, dword [ebp + eax*4 - 0x10c]
mov ebx, dword [ebp - 0x10]
lea eax, [ebp + eax*4 - 0x10c]
mov dword [ebx + ecx*4 + 0x8024], esi
add ecx, 1
mov dword [eax], ecx
xor ebx, ebx
add esi, 1
cmp esi, dword [ebp + 0xc]
jb 0x8b79a5
mov ecx, dword [ebp - 0x10]
add ecx, 0x8024
or esi, 0xffffffff
xor edi, edi
cmp edx, dword [ebp - 0x24]
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10c], ebx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 0xc8], ebx
mov dword [ebp + 8], ebx
mov dword [ebp - 0x14c], ebx
mov dword [ebp - 0x2c], ebx
jg 0x8b7cab
lea eax, [edx - 1]
mov dword [ebp - 0x28], eax
lea eax, [ebp + edx*4 - 0x84]
mov dword [ebp - 0x20], eax
lea ebx, [ebx]
mov eax, dword [ebp - 0x20]
mov eax, dword [eax]
test eax, eax
mov dword [ebp - 8], eax
je 0x8b7c94
mov eax, dword [ebp + esi*4 - 0xc4]
sub dword [ebp - 8], 1
add eax, ebx
cmp edx, eax
jle 0x8b7b80
mov ecx, dword [ebp - 8]
add ecx, 1
mov dword [ebp - 0x34], ecx
lea ecx, [ebp - 0x14c]
sub ecx, 4
mov dword [ebp - 0x38], ecx
lea ebx, [ebx]
mov edx, dword [ebp - 0x24]
mov edi, eax
mov eax, dword [ebp + 0x20]
mov eax, dword [eax]
sub edx, edi
add esi, 1
cmp edx, eax
mov dword [ebp + 8], edi
jbe 0x8b7a78
mov edx, eax
mov ebx, dword [ebp - 4]
sub ebx, edi
mov eax, 1
mov ecx, ebx
shl eax, cl
cmp eax, dword [ebp - 0x34]
jbe 0x8b7ab8
mov edi, dword [ebp - 0x20]
or ecx, 0xffffffff
sub ecx, dword [ebp - 8]
add ebx, 1
add eax, ecx
cmp ebx, edx
jae 0x8b7ab5
lea ecx, [ecx]
mov ecx, dword [edi + 4]
add edi, 4
add eax, eax
cmp eax, ecx
jbe 0x8b7ab5
add ebx, 1
sub eax, ecx
cmp ebx, edx
jb 0x8b7aa0
mov edi, dword [ebp + 8]
mov eax, dword [ebp - 0x30]
lea edx, [edi + ebx]
cmp edx, eax
jbe 0x8b7aca
cmp edi, eax
jae 0x8b7aca
mov ebx, eax
sub ebx, edi
mov ecx, ebx
mov edi, 1
shl edi, cl
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 4]
mov dword [ebp + esi*4 - 0xc4], ebx
lea eax, [edi*8 + 8]
push eax
mov dword [ebp - 0x3c], edi
call fcn.008f64e0
test eax, eax
je 0x8b7cd1
mov edx, dword [ebp + 0x1c]
lea ecx, [eax + 8]
add eax, 4
test esi, esi
mov dword [edx], ecx
mov edx, dword [ebp + 8]
mov dword [ebp + 0x1c], eax
mov dword [eax], 0
mov eax, ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp + esi*4 - 0x14c], eax
je 0x8b7b68
mov cl, byte [ebp + esi*4 - 0xc8]
mov edi, dword [ebp - 0x1c]
add bl, 0x10
mov byte [ebp - 0x17], cl
mov byte [ebp - 0x18], bl
mov ebx, eax
mov ecx, edx
mov eax, 1
shl eax, cl
sub ecx, dword [ebp + esi*4 - 0xc8]
mov dword [ebp + esi*4 - 0x10c], edi
mov dword [ebp - 0x14], ebx
sub eax, 1
and eax, edi
mov edi, dword [ebp - 0x18]
shr eax, cl
mov ecx, dword [ebp - 0x38]
mov ecx, dword [ecx + esi*4]
mov dword [ecx + eax*8], edi
mov edi, dword [ebp - 0x3c]
mov dword [ecx + eax*8 + 4], ebx
mov eax, dword [ebp + esi*4 - 0xc4]
add eax, edx
cmp dword [ebp - 4], eax
jg 0x8b7a60
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0xc]
mov dl, byte [ebp - 4]
mov eax, dword [ebp - 0x10]
sub dl, bl
mov byte [ebp - 0x17], dl
mov edx, dword [ebp + 0xc]
lea eax, [eax + edx*4 + 0x8024]
cmp ecx, eax
jb 0x8b7bad
mov byte [ebp - 0x18], 0x63
jmp 0x8b7be4
pop edi
pop esi
mov eax, 2
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
mov eax, dword [ecx]
mov edx, dword [ebp + 0x10]
cmp eax, edx
jae 0x8b7bc6
cmp eax, 0x100
setb dl
add dl, 0xf
mov byte [ebp - 0x18], dl
jmp 0x8b7bda
sub eax, edx
mov edx, dword [ebp + 0x18]
add eax, eax
mov dl, byte [eax + edx]
mov byte [ebp - 0x18], dl
mov edx, dword [ebp + 0x14]
mov ax, word [eax + edx]
add ecx, 4
mov dword [ebp - 0xc], ecx
mov word [ebp - 0x14], ax
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 0x1c]
sub ecx, ebx
mov edx, 1
shl edx, cl
mov ecx, ebx
shr eax, cl
cmp eax, edi
jae 0x8b7c1e
mov ecx, dword [ebp - 0x2c]
lea ecx, [ecx + eax*8]
mov ebx, dword [ebp - 0x18]
mov dword [ecx], ebx
mov ebx, dword [ebp - 0x14]
mov dword [ecx + 4], ebx
lea ebx, [edx*8]
add eax, edx
add ecx, ebx
cmp eax, edi
jb 0x8b7c01
mov ebx, dword [ebp + 8]
mov ecx, dword [ebp - 0x28]
mov edx, dword [ebp - 0x1c]
mov eax, 1
shl eax, cl
test edx, eax
je 0x8b7c38
nop
xor edx, eax
shr eax, 1
test edx, eax
jne 0x8b7c30
xor edx, eax
mov eax, 1
mov ecx, ebx
shl eax, cl
mov dword [ebp - 0x1c], edx
sub eax, 1
and eax, edx
cmp eax, dword [ebp + esi*4 - 0x10c]
je 0x8b7c84
jmp 0x8b7c60
sub ebx, dword [ebp + esi*4 - 0xc8]
sub esi, 1
mov eax, 1
mov ecx, ebx
shl eax, cl
sub eax, 1
and eax, edx
cmp eax, dword [ebp + esi*4 - 0x10c]
jne 0x8b7c60
mov dword [ebp + 8], ebx
cmp dword [ebp - 8], 0
mov edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xc]
jne 0x8b7a30
add dword [ebp - 0x20], 4
add dword [ebp - 0x28], 1
add edx, 1
cmp edx, dword [ebp - 0x24]
mov dword [ebp - 4], edx
jle 0x8b7a20
cmp dword [ebp - 0x40], 0
mov edx, dword [ebp - 0xc4]
mov eax, dword [ebp + 0x20]
mov dword [eax], edx
je 0x8b7cc6
mov eax, 1
cmp dword [ebp - 0x24], eax
jne 0x8b7cc8
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c
test esi, esi
je 0x8b7cf8
mov eax, dword [ebp - 0x14c]
test eax, eax
je 0x8b7cf8
nop
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx + 4]
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.008f6500
test esi, esi
mov eax, esi
jne 0x8b7ce0
pop edi
pop esi
mov eax, 3
pop ebx
mov esp, ebp
pop ebp
ret 0x1c