Function at 0x4f4060
Capabilities:
Encode data using xor

Disassembly:
sub esp, 8
push esi
mov esi, dword [esp + 0x10]
test esi, esi
mov dword [esp + 4], 0
jne 0x4f407c
lea eax, [esi - 0x66]
pop esi
add esp, 8
ret
push ebx
mov ebx, dword [esi + 0x9c]
test ebx, ebx
jne 0x4f4090
lea eax, [ebx - 0x66]
pop ebx
pop esi
add esp, 8
ret
cmp dword [ebx], 0
jne 0x4f40a0
pop ebx
mov eax, 0xffffff9c
pop esi
add esp, 8
ret
mov eax, dword [esp + 0x1c]
test eax, eax
jne 0x4f40ae
pop ebx
pop esi
add esp, 8
ret
mov ecx, dword [esp + 0x18]
mov dword [ebx + 0x10], ecx
mov ecx, dword [ebx + 0x5c]
cmp eax, ecx
mov dword [ebx + 0x14], eax
jbe 0x4f40cb
cmp dword [ebx + 0x8c], 0
jne 0x4f40cb
mov dword [ebx + 0x14], ecx
mov edx, dword [ebx + 0x58]
mov ecx, dword [ebx + 8]
add ecx, edx
cmp eax, ecx
jbe 0x4f40e3
cmp dword [ebx + 0x8c], 0
je 0x4f40e3
mov dword [ebx + 0x14], ecx
cmp dword [ebx + 0x14], 0
push ebp
push edi
ja 0x4f4104
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
mov esi, dword [esp + 0x1c]
cmp dword [ebx + 8], 0
jne 0x4f41e5
mov eax, dword [ebx + 0x58]
test eax, eax
jbe 0x4f41e5
mov edi, 0x4000
cmp eax, edi
mov dword [esp + 0x14], edi
jae 0x4f412c
mov dword [esp + 0x14], eax
mov edi, eax
mov edx, dword [ebx + 0x88]
add edx, dword [ebx + 0x3c]
mov eax, dword [ebx + 0x80]
mov ecx, dword [ebx + 0x7c]
push 0
push edx
mov edx, dword [ebx + 0x70]
push eax
push ecx
call edx
add esp, 0x10
test eax, eax
jne 0x4f42db
mov eax, dword [ebx]
mov ecx, dword [ebx + 0x80]
mov edx, dword [ebx + 0x7c]
push edi
push eax
mov eax, dword [ebx + 0x64]
push ecx
push edx
call eax
add esp, 0x10
cmp eax, edi
jne 0x4f42db
cmp dword [esi + 0xa0], 0
je 0x4f41d7
xor ebp, ebp
test edi, edi
jbe 0x4f41d7
add esi, 0xa4
jmp 0x4f4190
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx + 0xac]
mov edx, dword [ebx]
and eax, 0xfffd
lea edi, [edx + ebp]
or eax, 2
mov edx, eax
xor edx, 1
imul edx, eax
shr edx, 8
xor byte [edi], dl
mov eax, dword [ebx]
movsx eax, byte [eax + ebp]
mov edi, dword [ecx + 0xb0]
call fcn.004f34a0
mov ecx, dword [ebx]
mov byte [ecx + ebp], al
add ebp, 1
cmp ebp, dword [esp + 0x14]
jb 0x4f4190
mov edi, dword [esp + 0x14]
mov edx, dword [ebx]
add dword [ebx + 0x3c], edi
sub dword [ebx + 0x58], edi
mov dword [ebx + 4], edx
mov dword [ebx + 8], edi
cmp dword [ebx + 0x84], 0
je 0x4f425c
cmp dword [ebx + 0x8c], 0
jne 0x4f425c
mov eax, dword [ebx + 0x18]
mov esi, dword [ebx + 0x10]
lea ecx, [ebx + 4]
push 2
push ecx
mov dword [esp + 0x1c], eax
call fcn.004f6100
mov ebp, eax
add esp, 8
test ebp, ebp
jl 0x4f4220
cmp dword [ebx + 0x1c], 0
je 0x4f4220
mov ebp, 0xfffffffd
mov edi, dword [ebx + 0x18]
sub edi, dword [esp + 0x14]
test esi, esi
mov eax, dword [ebx + 0x50]
jne 0x4f4232
xor eax, eax
jmp 0x4f423b
mov edx, edi
mov ecx, esi
call fcn.004f7770
sub dword [ebx + 0x5c], edi
add dword [esp + 0x10], edi
cmp ebp, 1
mov dword [ebx + 0x50], eax
je 0x4f40eb
test ebp, ebp
je 0x4f42c5
pop edi
mov eax, ebp
pop ebp
pop ebx
pop esi
add esp, 8
ret
mov eax, dword [ebx + 8]
test eax, eax
jne 0x4f426c
cmp dword [ebx + 0x58], eax
je 0x4f40eb
mov edi, dword [ebx + 0x14]
cmp edi, eax
jb 0x4f4275
mov edi, eax
xor eax, eax
test edi, edi
jbe 0x4f4293
jmp 0x4f4280
mov edx, dword [ebx + 4]
mov dl, byte [eax + edx]
mov ecx, dword [ebx + 0x10]
mov byte [eax + ecx], dl
add eax, 1
cmp eax, edi
jb 0x4f4280
mov ebp, dword [ebx + 0x10]
test ebp, ebp
mov eax, dword [ebx + 0x50]
jne 0x4f42a1
xor eax, eax
jmp 0x4f42aa
mov edx, edi
mov ecx, ebp
call fcn.004f7770
sub dword [ebx + 0x5c], edi
sub dword [ebx + 8], edi
sub dword [ebx + 0x14], edi
add dword [ebx + 4], edi
add dword [ebx + 0x18], edi
add ebp, edi
add dword [esp + 0x10], edi
mov dword [ebx + 0x50], eax
mov dword [ebx + 0x10], ebp
cmp dword [ebx + 0x14], 0
ja 0x4f4100
mov eax, dword [esp + 0x10]
pop edi
pop ebp
pop ebx
pop esi
add esp, 8
ret
pop edi
pop ebp
pop ebx
or eax, 0xffffffff
pop esi
add esp, 8
ret