Function at 0x501570
Capabilities:
Encode data using xor

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x168
mov eax, dword [ebx + 0xc]
push esi
mov esi, dword [ebx + 8]
push edi
mov cl, byte [eax + 0x1f]
push eax
shr cl, 7
lea edi, [esi + 0x28]
push edi
mov byte [ebp - 1], cl
call fcn.004fe190
mov dword [esi + 0x50], 1
mov eax, dword [0x71417c]
mov dword [esi + 0x54], eax
mov eax, dword [0x714180]
mov dword [esi + 0x58], eax
mov eax, dword [0x714184]
mov dword [esi + 0x5c], eax
mov eax, dword [0x714188]
mov dword [esi + 0x60], eax
mov eax, dword [0x71418c]
mov dword [esi + 0x64], eax
mov eax, dword [0x714190]
mov dword [esi + 0x68], eax
mov eax, dword [0x714194]
mov dword [esi + 0x6c], eax
mov eax, dword [0x714198]
mov dword [esi + 0x70], eax
mov eax, dword [0x71419c]
mov dword [esi + 0x74], eax
lea eax, [ebp - 0xa4]
push edi
push eax
call fcn.004fec00
push 0x714150
lea eax, [ebp - 0xa4]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.004fe380
mov eax, dword [ebp - 0xa4]
add eax, 0xfffffb3
mov ecx, eax
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0xa0]
add eax, 0x7fffffc
shr ecx, 0x1a
sub ecx, dword [esi + 0x54]
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [esi + 0x58]
and eax, 0x1ffffff
mov dword [ebp - 8], eax
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x9c]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [esi + 0x5c]
and eax, 0x3ffffff
mov dword [ebp - 0x74], eax
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp - 0x98]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [esi + 0x60]
and eax, 0x1ffffff
mov dword [ebp - 0x78], eax
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x94]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
and eax, 0x3ffffff
shr ecx, 0x1a
mov dword [ebp - 0x7c], eax
mov dword [ebp - 0x94], eax
sub ecx, dword [esi + 0x64]
mov eax, dword [ebp - 0x90]
add eax, 0x7fffffc
mov edi, dword [esi + 0x70]
add ecx, eax
mov edx, dword [esi + 0x74]
mov eax, ecx
inc dword [ebp - 0x70]
and eax, 0x1ffffff
shr ecx, 0x19
sub ecx, dword [esi + 0x68]
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x8c]
add eax, 0xffffffc
add dword [ebp - 0x50], edi
add ecx, eax
add dword [ebp - 0x4c], edx
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [esi + 0x6c]
and eax, 0x3ffffff
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0x88]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
sub ecx, edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x84]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
sub ecx, edx
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x84], eax
mov eax, dword [ebp - 0x80]
add eax, 0x7fffffc
add eax, ecx
mov ecx, eax
shr eax, 0x19
imul eax, eax, 0x13
and ecx, 0x1ffffff
mov dword [ebp - 0x1c], ecx
mov dword [ebp - 0x80], ecx
mov ecx, dword [ebp - 0x20]
and ecx, 0x3ffffff
add eax, ecx
mov dword [ebp - 0xa4], eax
mov eax, dword [esi + 0x54]
add dword [ebp - 0x6c], eax
mov eax, dword [esi + 0x58]
add dword [ebp - 0x68], eax
mov eax, dword [esi + 0x5c]
add dword [ebp - 0x64], eax
mov eax, dword [esi + 0x60]
add dword [ebp - 0x60], eax
mov eax, dword [esi + 0x64]
add dword [ebp - 0x5c], eax
mov eax, dword [esi + 0x68]
add dword [ebp - 0x58], eax
mov eax, dword [esi + 0x6c]
add dword [ebp - 0x54], eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.004fec00
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x168]
push eax
call fcn.004fe380
lea eax, [ebp - 0x168]
push eax
push esi
call fcn.004fec00
lea eax, [ebp - 0x70]
push eax
push esi
push esi
call fcn.004fe380
add esp, 0x44
lea eax, [ebp - 0xa4]
push eax
push esi
push esi
call fcn.004fe380
push 1
lea eax, [ebp - 0x110]
push esi
push eax
call fcn.004ff040
push 2
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.004ff040
push esi
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0xe0]
push eax
call fcn.004fe380
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x110]
push eax
call fcn.004fe380
push 1
lea eax, [ebp - 0x110]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.004ff040
add esp, 0x48
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x140]
push eax
lea eax, [ebp - 0xe0]
push eax
call fcn.004fe380
lea eax, [ebp - 0xe0]
push eax
call fcn.004fea50
lea eax, [ebp - 0xe0]
push 2
push eax
push eax
call fcn.004ff040
push esi
lea eax, [ebp - 0xe0]
push eax
push esi
call fcn.004fe380
lea eax, [ebp - 0x168]
push eax
push esi
push esi
call fcn.004fe380
lea eax, [ebp - 0xa4]
push eax
push esi
push esi
call fcn.004fe380
add esp, 0x40
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.004fec00
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x48]
push eax
push eax
call fcn.004fe380
mov edx, dword [ebp - 0x48]
sub edx, dword [ebp - 0xa4]
mov ecx, dword [ebp - 0x44]
add edx, 0xfffffb4
add ecx, 0x7fffffc
mov eax, edx
shr eax, 0x1a
sub eax, dword [ebp - 8]
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x74]
and eax, 0x1ffffff
mov dword [ebp - 0xdc], eax
mov eax, dword [ebp - 0x40]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x78]
and eax, 0x3ffffff
mov dword [ebp - 0xd8], eax
mov eax, dword [ebp - 0x3c]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x7c]
and eax, 0x1ffffff
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0x38]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0xc]
and eax, 0x3ffffff
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0x34]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x10]
and eax, 0x1ffffff
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0x30]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x14]
and eax, 0x3ffffff
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0x2c]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x18]
and eax, 0x1ffffff
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0x28]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x1c]
and eax, 0x3ffffff
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x24]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
and eax, 0x1ffffff
mov dword [ebp - 0xbc], eax
and edx, 0x3ffffff
shr ecx, 0x19
imul eax, ecx, 0x13
add eax, edx
mov dword [ebp - 0xe0], eax
lea eax, [ebp - 0xe0]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.004fdd80
xor esi, esi
add esp, 0x1c
xor edx, edx
lea edi, [esi + 0x20]
nop
movzx ecx, byte [edx + 0x715100]
lea edx, [edx + 1]
movzx eax, byte [ebp + edx - 0x69]
xor ecx, eax
or esi, ecx
sub edi, 1
jne 0x501a20
lea eax, [esi - 1]
mov esi, dword [ebx + 8]
test eax, 0x100
jne 0x501b6f
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 0xa4]
mov ecx, edx
and edx, 0x3ffffff
shr ecx, 0x1a
add ecx, dword [ebp - 0x44]
add ecx, dword [ebp - 8]
mov eax, ecx
shr ecx, 0x19
add ecx, dword [ebp - 0x40]
and eax, 0x1ffffff
add ecx, dword [ebp - 0x74]
mov dword [ebp - 0x44], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0x78]
mov dword [ebp - 0x40], eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0x7c]
mov dword [ebp - 0x3c], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0xc]
mov dword [ebp - 0x38], eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
add ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0x30], eax
mov eax, ecx
and eax, 0x1ffffff
shr ecx, 0x19
add ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x2c], eax
mov eax, ecx
and eax, 0x3ffffff
shr ecx, 0x1a
add ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x28], eax
mov eax, ecx
and eax, 0x1ffffff
shr ecx, 0x19
mov dword [ebp - 0x24], eax
imul eax, ecx, 0x13
add eax, edx
mov dword [ebp - 0x48], eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x68]
push eax
call fcn.004fdd80
xor esi, esi
add esp, 8
xor edx, edx
lea edi, [esi + 0x20]
jmp 0x501b30
movzx ecx, byte [edx + 0x715100]
lea edx, [edx + 1]
movzx eax, byte [ebp + edx - 0x69]
xor ecx, eax
or esi, ecx
sub edi, 1
jne 0x501b30
lea eax, [esi - 1]
mov esi, dword [ebx + 8]
test eax, 0x100
jne 0x501b60
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x7141d0
push esi
push esi
call fcn.004fe380
add esp, 0xc
lea eax, [ebp - 0x68]
push esi
push eax
call fcn.004fdd80
mov al, byte [ebp - 0x68]
add esp, 8
and al, 1
cmp al, byte [ebp - 1]
jne 0x501c93
mov eax, dword [esi + 0x14]
mov dword [ebp - 0x20], eax
mov eax, dword [esi + 0x18]
mov dword [ebp - 0x1c], eax
mov eax, dword [esi + 0x1c]
mov dword [ebp - 0x18], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x14], eax
mov eax, dword [esi + 0x24]
mov dword [ebp - 0x10], eax
mov eax, 0x7ffffda
sub eax, dword [esi]
mov dword [ebp - 0xc], eax
shr eax, 0x1a
sub eax, dword [esi + 4]
add eax, 0x3fffffe
mov dword [ebp - 8], eax
and eax, 0x1ffffff
mov dword [esi + 4], eax
mov eax, dword [ebp - 8]
shr eax, 0x19
sub eax, dword [esi + 8]
mov ecx, eax
mov dword [ebp - 8], eax
add ecx, 0x7fffffe
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
mov dword [esi + 8], eax
sub ecx, dword [esi + 0xc]
add ecx, 0x3fffffe
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
mov dword [esi + 0xc], eax
sub ecx, dword [esi + 0x10]
add ecx, 0x7fffffe
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x20]
and eax, 0x3ffffff
add ecx, 0x3fffffe
mov dword [esi + 0x10], eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x1c]
and eax, 0x1ffffff
add ecx, 0x7fffffe
mov dword [esi + 0x14], eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x18]
and eax, 0x3ffffff
add ecx, 0x3fffffe
mov dword [esi + 0x18], eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x14]
and eax, 0x1ffffff
add ecx, 0x7fffffe
mov dword [esi + 0x1c], eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x10]
and eax, 0x3ffffff
add ecx, 0x3fffffe
mov dword [esi + 0x20], eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
mov dword [esi + 0x24], eax
imul eax, ecx, 0x13
mov ecx, dword [ebp - 0xc]
and ecx, 0x3ffffff
add eax, ecx
mov dword [esi], eax
lea eax, [esi + 0x28]
push eax
push esi
add esi, 0x78
push esi
call fcn.004fe380
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret