Function at 0x4f77f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
push ebx
mov ebx, ecx
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 0x1c]
xor eax, eax
push esi
push edi
cmp dword [ebx], eax
mov esi, 0xd
mov dword [esp + 0xc], ebx
sete al
add edx, 0xffffffff
mov dword [esp + 0x28], eax
js 0x4f7839
mov ebx, dword [ebp + 0x18]
movzx ecx, byte [edx + ebx]
lea eax, [esi*8]
xor ecx, eax
xor esi, ecx
sub edx, 1
jns 0x4f7821
mov ebx, dword [esp + 0xc]
movzx ecx, byte [ebp + 0x14]
lea eax, [esi*8]
mov ebx, dword [ebx + 0xc]
xor eax, ecx
xor eax, esi
mov ecx, dword [esp + 0xc]
xor edx, edx
div ebx
mov edi, edx
mov edx, dword [ecx + 0x14]
mov dword [esp + 0x14], edi
mov dword [esp + 0x10], edx
lea eax, [edi*4]
mov esi, dword [eax + edx]
test esi, esi
je 0x4f78f8
mov al, byte [ebp + 0x14]
cmp byte [esi + 0x28], al
jne 0x4f78ea
mov eax, dword [ebp + 0x1c]
cmp dword [esi + 0x14], eax
jne 0x4f78e7
mov edx, dword [ebp + 0x18]
lea ecx, [esi + 0x29]
mov edi, eax
sub edi, 4
jb 0x4f78a1
nop
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x4f78aa
add ecx, 4
add edx, 4
sub edi, 4
jae 0x4f7890
cmp edi, 0xfffffffc
je 0x4f7a7f
mov al, byte [ecx]
cmp al, byte [edx]
jne 0x4f78e7
cmp edi, 0xfffffffd
je 0x4f7a7f
mov al, byte [ecx + 1]
cmp al, byte [edx + 1]
jne 0x4f78e7
cmp edi, 0xfffffffe
je 0x4f7a7f
mov al, byte [ecx + 2]
cmp al, byte [edx + 2]
jne 0x4f78e7
cmp edi, 0xffffffff
je 0x4f7a7f
mov al, byte [ecx + 3]
cmp al, byte [edx + 3]
je 0x4f7a7f
mov al, byte [ebp + 0x14]
mov esi, dword [esi]
test esi, esi
jne 0x4f7875
mov edi, dword [esp + 0x14]
mov ecx, dword [esp + 0xc]
mov edx, dword [ebp + 0x1c]
add edx, 0x6a
mov dword [esp + 0x14], edx
cmp edx, 0x80
jae 0x4f7912
mov dword [esp + 0x14], 0x80
mov eax, dword [ecx + 8]
add eax, eax
cmp eax, ebx
jl 0x4f7b29
add ebx, ebx
mov dword [esp + 0x24], ebx
lea esi, [ebx*4]
call fcn.004cbab0
test eax, eax
jne 0x4f7daa
mov eax, esi
or eax, 0
je 0x4f7daa
push 0
push esi
call fcn.0043a970
mov edi, eax
add esp, 8
mov dword [esp + 0x2c], edi
test edi, edi
je 0x4f7daa
push esi
push 0
push edi
call sub.VCRUNTIME140.dll_memset
mov esi, dword [esp + 0x18]
xor eax, eax
add esp, 0xc
mov dword [esp + 0x1c], eax
cmp dword [esi + 0xc], eax
jle 0x4f7a14
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x20], ecx
mov ebx, dword [ecx]
test ebx, ebx
je 0x4f79fb
nop word [eax + eax]
mov eax, dword [ebx]
mov dword [ecx], eax
lea eax, [ebx + 0x28]
lea edx, [eax + 1]
nop word [eax + eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4f79a0
sub eax, edx
mov esi, 0xd
add eax, 0xffffffff
js 0x4f79d5
nop dword [eax]
nop word [eax + eax]
movzx edx, byte [eax + ebx + 0x28]
lea ecx, [esi*8]
xor edx, ecx
xor esi, edx
sub eax, 1
jns 0x4f79c0
xor edx, edx
mov edi, dword [esp + 0x2c]
mov eax, esi
mov ecx, dword [esp + 0x20]
div dword [esp + 0x24]
mov eax, dword [edi + edx*4]
mov dword [ebx], eax
mov dword [edi + edx*4], ebx
mov ebx, dword [ecx]
test ebx, ebx
jne 0x4f7990
mov eax, dword [esp + 0x1c]
mov esi, dword [esp + 0xc]
inc eax
add ecx, 4
mov dword [esp + 0x1c], eax
mov dword [esp + 0x20], ecx
cmp eax, dword [esi + 0xc]
jl 0x4f7984
mov ebx, dword [esp + 0x24]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x4f7b0e
cmp dword [0x535068], 0
je 0x4f7b04
mov eax, dword [0x538818]
test eax, eax
je 0x4f7a40
push eax
call dword [0x5350b8]
add esp, 4
push dword [esp + 0x10]
call dword [0x535094]
sub dword [0x538620], eax
add esp, 4
dec dword [0x538644]
push dword [esp + 0x10]
call dword [0x53508c]
mov eax, dword [0x538818]
add esp, 4
test eax, eax
je 0x4f7b0e
push eax
call dword [0x5350c0]
jmp 0x4f7b0b
mov ecx, dword [esi + 8]
mov eax, ecx
sub eax, dword [esi + 0x10]
cmp eax, 0x16
jge 0x4f7af0
lea ebx, [ecx + ecx]
call fcn.004cbab0
test eax, eax
jne 0x4f7daa
mov eax, ebx
mov ecx, esi
cdq
push edx
push eax
call fcn.0043ad10
mov edi, eax
add esp, 8
test edi, edi
je 0x4f7daa
mov ecx, dword [esp + 0x14]
mov dword [edi + 8], ebx
mov ebx, dword [esp + 0xc]
lea eax, [ecx*4]
mov edx, dword [ebx + 0x14]
add edx, eax
mov ecx, dword [edx]
cmp ecx, esi
je 0x4f7adc
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp eax, esi
jne 0x4f7ad2
mov ecx, dword [ebp + 8]
mov esi, edi
mov dword [edx], edi
mov edx, dword [ebp + 0xc]
mov edi, dword [esi + 0x10]
neg edi
jmp 0x4f7c2c
mov edi, dword [esi + 0x10]
mov ebx, dword [esp + 0xc]
neg edi
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 0xc]
jmp 0x4f7c2c
push eax
call dword [0x53508c]
add esp, 4
push dword [ebp + 0x1c]
mov dl, byte [ebp + 0x14]
mov ecx, ebx
push dword [ebp + 0x18]
mov dword [esi + 0xc], ebx
mov dword [esi + 0x14], edi
call fcn.004f7520
add esp, 8
mov edi, eax
call fcn.004cbab0
test eax, eax
jne 0x4f7daa
mov ecx, dword [esp + 0x14]
mov eax, ecx
or eax, 0
je 0x4f7b54
push 0
push ecx
call fcn.0043a970
mov ecx, dword [esp + 0x1c]
add esp, 8
mov esi, eax
jmp 0x4f7b56
xor esi, esi
test esi, esi
je 0x4f7daa
mov al, byte [ebp + 0x14]
xorps xmm0, xmm0
mov ebx, dword [ebp + 0x1c]
movups xmmword [esi], xmm0
push ebx
push dword [ebp + 0x18]
movups xmmword [esi + 0x10], xmm0
movq qword [esi + 0x20], xmm0
mov dword [esi + 8], ecx
mov byte [esi + 0x28], al
lea eax, [esi + 0x29]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov dword [esi + 0x14], ebx
lea eax, [ebx + 0x2a]
mov byte [esi + ebx + 0x29], 0
add esp, 0xc
mov ebx, dword [esp + 0xc]
mov dword [esi + 0x10], eax
mov eax, dword [ebx + 0x14]
mov eax, dword [eax + edi*4]
mov dword [esi], eax
mov eax, dword [ebx + 0x14]
mov dword [eax + edi*4], esi
inc dword [ebx + 8]
mov edx, dword [esi + 0x10]
mov edi, dword [ebp + 0xc]
add edx, esi
mov eax, dword [ebp + 8]
test edi, edi
ja 0x4f7bf8
jb 0x4f7bc2
cmp eax, 0x7f
ja 0x4f7bcd
and al, 0x7f
mov byte [edx], al
mov eax, 1
jmp 0x4f7c04
test edi, edi
ja 0x4f7bf8
jb 0x4f7bda
cmp eax, 0x3fff
ja 0x4f7bf8
mov ecx, eax
mov eax, edi
shrd ecx, eax, 7
or cl, 0x80
mov byte [edx], cl
mov ecx, dword [ebp + 8]
mov al, cl
and al, 0x7f
mov byte [edx + 1], al
mov eax, 2
jmp 0x4f7c07
push edi
push eax
mov ecx, edx
call fcn.0050e5e0
add esp, 8
mov ecx, dword [ebp + 8]
add dword [esi + 0x10], eax
mov edi, dword [esi + 0x10]
mov edx, dword [ebp + 0xc]
mov dword [esi + 0x20], ecx
mov dword [esi + 0x24], edx
mov dword [esi + 0xc], edi
cmp dword [ebx], 1
je 0x4f7c2c
inc edi
mov dword [esi + 0x10], edi
mov eax, dword [ebx]
neg eax
sbb eax, eax
mov word [esi + 0x1a], ax
cmp ecx, dword [esi + 0x20]
jne 0x4f7c3a
cmp edx, dword [esi + 0x24]
je 0x4f7cdc
push 0
mov edx, esi
mov ecx, ebx
call fcn.004f7700
mov ecx, dword [ebp + 8]
add esp, 4
sub ecx, dword [esi + 0x20]
mov edx, dword [ebp + 0xc]
sbb edx, dword [esi + 0x24]
mov ebx, dword [esi + 0x10]
add ebx, esi
test edx, edx
ja 0x4f7c95
jb 0x4f7c64
cmp ecx, 0x7f
ja 0x4f7c70
and cl, 0x7f
mov eax, 1
mov byte [ebx], cl
jmp 0x4f7ca1
test edx, edx
ja 0x4f7c95
jb 0x4f7c7e
cmp ecx, 0x3fff
ja 0x4f7c95
mov eax, ecx
shrd eax, edx, 7
or al, 0x80
and cl, 0x7f
mov byte [ebx], al
mov eax, 2
mov byte [ebx + 1], cl
jmp 0x4f7ca1
push edx
push ecx
mov ecx, ebx
call fcn.0050e5e0
add esp, 8
mov ecx, dword [ebp + 8]
mov ebx, dword [esp + 0xc]
add dword [esi + 0x10], eax
mov eax, dword [esi + 0x10]
mov dword [esi + 0x20], ecx
mov ecx, dword [ebp + 0xc]
mov dword [esi + 0x24], ecx
mov dword [esi + 0xc], eax
cmp dword [ebx], 1
mov dword [esp + 0x28], 1
je 0x4f7cdc
inc eax
mov dword [esi + 0x10], eax
mov eax, dword [ebx]
neg eax
mov dword [esi + 0x1c], 0
sbb eax, eax
mov word [esi + 0x1a], ax
mov edx, dword [esp + 0x18]
test edx, edx
js 0x4f7d8f
mov ecx, dword [ebx]
cmp ecx, 1
jne 0x4f7d09
mov eax, dword [esi + 0x10]
mov byte [esi + 0x19], cl
add eax, edi
mov ecx, dword [esp + 0xc]
mov ecx, dword [ecx + 4]
add dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
movsx eax, word [esi + 0x1a]
cmp edx, eax
je 0x4f7d42
movzx ebx, dx
test ecx, ecx
jne 0x4f7d89
mov eax, dword [esi + 0x10]
mov byte [esi + eax], 1
mov eax, edx
inc dword [esi + 0x10]
mov ecx, dword [esi + 0x10]
cdq
add ecx, esi
push edx
push eax
call fcn.0050e6f0
add esp, 8
mov word [esi + 0x1a], bx
add dword [esi + 0x10], eax
mov dword [esi + 0x1c], 0
cmp dword [esp + 0x28], 0
je 0x4f7d93
mov edx, dword [ebp + 0x10]
mov dword [esp + 0x18], edx
mov ecx, dword [esi + 0x10]
mov eax, edx
sub eax, dword [esi + 0x1c]
add ecx, esi
add eax, 2
cdq
push edx
push eax
call fcn.0050e6f0
add dword [esi + 0x10], eax
add esp, 8
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x18]
mov eax, dword [esi + 0x10]
mov dword [esi + 0x1c], edx
add eax, edi
mov ecx, dword [ecx + 4]
add dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov word [esi + 0x1a], bx
jmp 0x4f7d50
mov byte [esi + 0x18], 1
mov ecx, dword [esp + 0xc]
mov eax, dword [esi + 0x10]
add eax, edi
mov ecx, dword [ecx + 4]
add dword [ecx], eax
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
mov eax, 7
pop ebx
mov esp, ebp
pop ebp
ret