Function at 0x4f8d40
Capabilities:
Encode data using xor

Disassembly:
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x24]
mov edx, dword [esp + 0x20]
sub esp, 0x98
push ebp
mov ebp, dword [esp + 0xac]
push esi
mov esi, dword [esp + 0xa8]
push eax
push ecx
mov ecx, dword [esp + 0xc4]
lea eax, [esp + 0x54]
push edx
mov edx, dword [esp + 0xc4]
push eax
push ecx
push edx
push esi
push ebp
call fcn.00547180
add esp, 0x20
test eax, eax
je 0x4f8d96
pop esi
mov eax, 1
pop ebp
add esp, 0x98
ret
mov edx, dword [ebp + 8]
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x60]
push ebx
mov ebx, dword [esi + 8]
mov dword [esp + 0xc], edx
mov edx, dword [esp + 0x58]
mov esi, dword [esp + 0x54]
imul edx, ebx
push edi
mov edi, dword [esp + 0x6c]
sub eax, ecx
mov ecx, dword [esp + 0x74]
sub ecx, edi
imul edi, dword [esp + 0x10]
lea ebp, [edx + esi*4]
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x38], eax
mov dword [esp + 0x2c], ebx
add ebp, dword [edx + 4]
mov edx, dword [esp + 0x68]
lea edi, [edi + edx*4]
mov edx, dword [esp + 0xb8]
add edi, dword [edx + 4]
mov dl, byte [esp + 0x54]
test dl, dl
je 0x4f9136
mov ebx, eax
mov edx, eax
sar ebx, 3
mov dword [esp + 0x28], ebx
mov ebx, dword [esp + 0x60]
and edx, 7
sub esi, ebx
mov ebx, dword [esp + 0x2c]
add esi, edx
mov dword [esp + 0x1c], edx
lea esi, [ebx + esi*4]
mov dword [esp + 0x30], esi
mov esi, edx
sub esi, eax
mov eax, dword [esp + 0x10]
test ecx, ecx
lea eax, [eax + esi*4]
mov dword [esp + 0x2c], eax
jle 0x4f92ae
mov dword [esp + 0x18], ecx
mov eax, dword [esp + 0x28]
test eax, eax
jle 0x4f909c
lea esi, [ebp + 0xb]
mov dword [esp + 0x14], eax
mov ecx, dword [ebp]
xor edx, edx
mov dl, byte [esi - 8]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [esp + 0x14]
call fcn.004f92c0
lea eax, [esp + 0x10]
mov ecx, edi
push eax
call fcn.004f8d00
mov ecx, dword [esi - 7]
xor edx, edx
mov dl, byte [esi - 4]
mov dword [esp + 0x10], ecx
push edx
lea ecx, [esp + 0x14]
call fcn.004f92c0
mov eax, dword [edi + 4]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
lea ecx, [esp + 0x10]
mov dword [edi + 4], eax
mov edx, dword [esi - 3]
xor eax, eax
mov dword [esp + 0x10], edx
mov al, byte [esi]
push eax
call fcn.004f92c0
mov eax, dword [edi + 8]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
lea ecx, [esp + 0x10]
mov dword [edi + 8], eax
mov edx, dword [esi + 1]
xor eax, eax
mov dword [esp + 0x10], edx
mov al, byte [esi + 4]
push eax
call fcn.004f92c0
mov eax, dword [edi + 0xc]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
mov dword [edi + 0xc], eax
mov edx, dword [esi + 5]
xor eax, eax
lea ecx, [esp + 0x10]
mov al, byte [esi + 8]
mov dword [esp + 0x10], edx
push eax
call fcn.004f92c0
mov eax, dword [edi + 0x10]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
lea ecx, [esp + 0x10]
mov dword [edi + 0x10], eax
mov edx, dword [esi + 9]
xor eax, eax
mov dword [esp + 0x10], edx
mov al, byte [esi + 0xc]
push eax
call fcn.004f92c0
mov eax, dword [edi + 0x14]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
lea ecx, [esp + 0x10]
mov dword [edi + 0x14], eax
mov edx, dword [esi + 0xd]
xor eax, eax
mov dword [esp + 0x10], edx
mov al, byte [esi + 0x10]
push eax
call fcn.004f92c0
mov eax, dword [edi + 0x18]
mov edx, dword [esp + 0x10]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
lea ecx, [esp + 0x10]
mov dword [edi + 0x18], eax
mov edx, dword [esi + 0x11]
xor eax, eax
mov dword [esp + 0x10], edx
mov al, byte [esi + 0x14]
push eax
call fcn.004f92c0
mov eax, dword [edi + 0x1c]
mov edx, dword [esp + 0x10]
mov ecx, eax
mov ebx, eax
and ecx, edx
xor ebx, edx
and ebx, 0xfefefe
add edi, 0x20
add ebp, 0x20
add esi, 0x20
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
mov dword [edi - 4], eax
mov eax, dword [esp + 0x14]
dec eax
mov dword [esp + 0x14], eax
jne 0x4f8e4b
mov edx, dword [esp + 0x1c]
test edx, edx
jle 0x4f910e
mov ebx, ebp
mov esi, edi
sub ebx, edi
mov dword [esp + 0x10], edx
mov edx, dword [ebx + esi]
xor eax, eax
mov al, byte [ebx + esi + 3]
lea ecx, [esp + 0x14]
push eax
mov dword [esp + 0x18], edx
call fcn.004f92c0
mov eax, dword [esi]
mov edx, dword [esp + 0x14]
mov ecx, eax
add esi, 4
and ecx, edx
mov edx, eax
xor edx, dword [esp + 0x14]
and edx, 0xfefefe
lea ecx, [edx + ecx*2]
mov edx, dword [esp + 0x14]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
or eax, ecx
mov dword [esi - 4], eax
mov eax, dword [esp + 0x10]
dec eax
mov dword [esp + 0x10], eax
jne 0x4f90aa
mov edx, dword [esp + 0x1c]
mov esi, dword [esp + 0x2c]
mov ecx, dword [esp + 0x30]
mov eax, dword [esp + 0x18]
add edi, esi
add ebp, ecx
dec eax
mov dword [esp + 0x18], eax
jne 0x4f8e38
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x98
ret
mov edx, dword [esp + 0x94]
mov esi, dword [esp + 0x88]
shl edx, 2
mov dword [esp + 0x50], edx
mov edx, ebx
imul edx, dword [esp + 0xa4]
mov dword [esp + 0x34], esi
mov esi, dword [esp + 0x8c]
mov dword [esp + 0x48], esi
mov esi, dword [esp + 0x9c]
mov dword [esp + 0x30], esi
mov esi, dword [esp + 0x90]
mov dword [esp + 0x40], esi
mov esi, dword [esp + 0xa0]
mov dword [esp + 0x4c], esi
mov esi, dword [esp + 0x98]
test ecx, ecx
mov dword [esp + 0x3c], edx
jle 0x4f92ae
mov dword [esp + 0x28], ecx
jmp 0x4f91a2
mov esi, dword [esp + 0x18]
add esi, dword [esp + 0x30]
mov dword [esp + 0x18], esi
js 0x4f91b8
mov ecx, dword [esp + 0x4c]
add ebp, ebx
sub esi, ecx
mov dword [esp + 0x18], esi
mov ecx, dword [esp + 0x34]
mov dword [esp + 0x44], ebp
test eax, eax
mov dword [esp + 0x14], ecx
jle 0x4f9292
mov esi, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x14]
mov ecx, dword [esp + 0x48]
add eax, ecx
mov dword [esp + 0x14], eax
js 0x4f91ef
mov ecx, dword [esp + 0x40]
add ebp, 4
sub eax, ecx
mov dword [esp + 0x14], eax
mov eax, dword [ebp]
xor ecx, ecx
mov ch, byte [ebp + 3]
mov dword [esp + 0x20], eax
and eax, 0xff
add esi, 4
mov dl, byte [eax + ecx + 0xa2ee04]
mov eax, dword [esp + 0x21]
and eax, 0xff
mov byte [esp + 0x20], dl
mov dl, byte [eax + ecx + 0xa2ee04]
mov eax, dword [esp + 0x22]
and eax, 0xff
mov byte [esp + 0x21], dl
mov byte [esp + 0x23], 0
mov cl, byte [eax + ecx + 0xa2ee04]
mov eax, dword [esi - 4]
mov byte [esp + 0x22], cl
mov edx, dword [esp + 0x20]
mov ebx, eax
mov ecx, eax
xor ebx, edx
and ecx, edx
and ebx, 0xfefefe
lea ecx, [ebx + ecx*2]
shr ecx, 8
and ecx, 0x10101
add ecx, 0x7f7f7f
xor ecx, 0x7f7f7f
sub eax, ecx
add eax, edx
mov edx, dword [esp + 0x50]
or eax, ecx
add ebp, edx
mov dword [esi - 4], eax
mov eax, dword [esp + 0x1c]
dec eax
mov dword [esp + 0x1c], eax
jne 0x4f91d2
mov ebx, dword [esp + 0x2c]
mov eax, dword [esp + 0x38]
mov edx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x44]
mov esi, dword [esp + 0x10]
add edi, esi
lea ebp, [ecx + edx]
mov ecx, dword [esp + 0x28]
dec ecx
mov dword [esp + 0x28], ecx
jne 0x4f919e
pop edi
pop ebx
pop esi
xor eax, eax
pop ebp
add esp, 0x98
ret