Function at 0x505620
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, 0x178
mov eax, dword [ebx + 0xc]
push esi
mov esi, dword [ebx + 8]
push edi
mov cl, byte [eax + 0x1f]
shr cl, 7
mov byte [ebp - 5], cl
lea ecx, [esi + 0x28]
push eax
push ecx
call fcn.00502280
mov dword [esi + 0x50], 1
mov eax, dword [0x71c4d4]
mov dword [esi + 0x54], eax
mov eax, dword [0x71c4d4]
mov dword [ebp - 0xc], eax
mov eax, dword [0x71c4d8]
mov dword [esi + 0x58], eax
mov eax, dword [0x71c4d8]
mov dword [ebp - 0x9c], eax
mov eax, dword [0x71c4dc]
mov dword [esi + 0x5c], eax
mov eax, dword [0x71c4dc]
mov dword [ebp - 0xa0], eax
mov eax, dword [0x71c4e0]
mov dword [esi + 0x60], eax
mov eax, dword [0x71c4e0]
mov dword [ebp - 0xa4], eax
mov eax, dword [0x71c4e4]
mov dword [esi + 0x64], eax
mov eax, dword [0x71c4e4]
mov dword [ebp - 0xa8], eax
mov eax, dword [0x71c4e8]
mov dword [esi + 0x68], eax
mov eax, dword [0x71c4e8]
mov dword [ebp - 0xac], eax
mov eax, dword [0x71c4ec]
mov dword [esi + 0x6c], eax
mov eax, dword [0x71c4ec]
mov dword [ebp - 0xb0], eax
mov eax, dword [0x71c4f0]
mov dword [esi + 0x70], eax
mov eax, dword [0x71c4f4]
mov edi, dword [0x71c4f0]
mov dword [esi + 0x74], eax
lea eax, [esi + 0x28]
push eax
lea eax, [ebp - 0x70]
push eax
call fcn.00502cf0
push 0x71b520
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.00502470
mov eax, dword [ebp - 0x70]
add eax, 0xfffffb3
mov ecx, eax
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x6c]
sub eax, dword [ebp - 0xc]
add eax, 0x7fffffc
shr ecx, 0x1a
add eax, ecx
mov ecx, eax
and eax, 0x1ffffff
mov dword [ebp - 0xb4], eax
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x9c]
shr ecx, 0x19
add eax, 0xffffffc
add eax, ecx
mov ecx, eax
and eax, 0x3ffffff
mov dword [ebp - 0xb8], eax
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x64]
shr ecx, 0x1a
sub eax, dword [ebp - 0xa0]
add eax, 0x7fffffc
mov edx, dword [0x71c4f4]
add eax, ecx
inc dword [ebp - 0x98]
mov ecx, eax
and eax, 0x1ffffff
mov dword [ebp - 0xbc], eax
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x60]
sub eax, dword [ebp - 0xa4]
add eax, 0xffffffc
shr ecx, 0x19
add eax, ecx
mov ecx, eax
and eax, 0x3ffffff
mov dword [ebp - 0xc0], eax
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x5c]
sub eax, dword [ebp - 0xa8]
add eax, 0x7fffffc
shr ecx, 0x1a
add eax, ecx
mov ecx, eax
and eax, 0x1ffffff
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x58]
sub eax, dword [ebp - 0xac]
add eax, 0xffffffc
shr ecx, 0x19
add eax, ecx
mov ecx, eax
and eax, 0x3ffffff
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
sub eax, dword [ebp - 0xb0]
add eax, 0x7fffffc
shr ecx, 0x1a
add eax, ecx
mov ecx, eax
and eax, 0x1ffffff
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0x50]
sub eax, edi
shr ecx, 0x19
add eax, 0xffffffc
add eax, ecx
mov ecx, eax
and eax, 0x3ffffff
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x4c]
sub eax, edx
shr ecx, 0x1a
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
and ecx, 0x1ffffff
shr eax, 0x19
imul eax, eax, 0x13
mov dword [ebp - 0x20], ecx
mov dword [ebp - 0x4c], ecx
mov ecx, dword [ebp - 4]
and ecx, 0x3ffffff
add ecx, eax
mov eax, dword [ebp - 0xc]
add dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x9c]
add dword [ebp - 0x90], eax
mov eax, dword [ebp - 0xa0]
add dword [ebp - 0x8c], eax
mov eax, dword [ebp - 0xa4]
add dword [ebp - 0x88], eax
mov eax, dword [ebp - 0xa8]
add dword [ebp - 0x84], eax
mov eax, dword [ebp - 0xac]
add dword [ebp - 0x80], eax
mov dword [ebp - 4], ecx
mov dword [ebp - 0x70], ecx
mov eax, dword [ebp - 0xb0]
add dword [ebp - 0x7c], eax
lea eax, [ebp - 0x98]
add dword [ebp - 0x78], edi
add dword [ebp - 0x74], edx
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.00502cf0
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x48]
push eax
lea eax, [ebp - 0x178]
push eax
call fcn.00502470
lea eax, [ebp - 0x178]
push eax
push esi
call fcn.00502cf0
lea eax, [ebp - 0x98]
push eax
push esi
push esi
call fcn.00502470
add esp, 0x44
lea eax, [ebp - 0x70]
push eax
push esi
push esi
call fcn.00502470
push 1
lea eax, [ebp - 0x120]
push esi
push eax
call fcn.00503130
push 2
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x150]
push eax
call fcn.00503130
push esi
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00502470
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0xf0]
push eax
lea eax, [ebp - 0x120]
push eax
call fcn.00502470
push 1
lea eax, [ebp - 0x120]
push eax
lea eax, [ebp - 0x150]
push eax
call fcn.00503130
add esp, 0x48
lea eax, [ebp - 0xf0]
push eax
lea eax, [ebp - 0x150]
push eax
lea eax, [ebp - 0xf0]
push eax
call fcn.00502470
lea eax, [ebp - 0xf0]
push eax
call fcn.00502b40
lea eax, [ebp - 0xf0]
push 2
push eax
push eax
call fcn.00503130
push esi
lea eax, [ebp - 0xf0]
push eax
push esi
call fcn.00502470
lea eax, [ebp - 0x178]
push eax
push esi
push esi
call fcn.00502470
lea eax, [ebp - 0x70]
push eax
push esi
push esi
call fcn.00502470
add esp, 0x40
lea eax, [ebp - 0x48]
push esi
push eax
call fcn.00502cf0
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x48]
push eax
push eax
call fcn.00502470
mov edx, dword [ebp - 0x48]
sub edx, dword [ebp - 4]
mov eax, dword [ebp - 0x44]
add edx, 0xfffffb4
sub eax, dword [ebp - 0xb4]
mov ecx, edx
add eax, 0x7fffffc
shr ecx, 0x1a
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0xb8]
and eax, 0x1ffffff
mov dword [ebp - 0x6c], eax
mov eax, dword [ebp - 0x40]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0xbc]
and eax, 0x3ffffff
mov dword [ebp - 0x68], eax
mov eax, dword [ebp - 0x3c]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0xc0]
and eax, 0x1ffffff
mov dword [ebp - 0x64], eax
mov eax, dword [ebp - 0x38]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x10]
and eax, 0x3ffffff
mov dword [ebp - 0x60], eax
mov eax, dword [ebp - 0x34]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
sub ecx, dword [ebp - 0x14]
and eax, 0x1ffffff
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0x30]
add eax, 0xffffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x18]
and eax, 0x3ffffff
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x2c]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
and eax, 0x1ffffff
mov dword [ebp - 0x54], eax
and edx, 0x3ffffff
mov eax, dword [ebp - 0x28]
add eax, 0xffffffc
shr ecx, 0x19
sub ecx, dword [ebp - 0x1c]
add ecx, eax
mov eax, ecx
shr ecx, 0x1a
sub ecx, dword [ebp - 0x20]
and eax, 0x3ffffff
mov dword [ebp - 0x50], eax
mov eax, dword [ebp - 0x24]
add eax, 0x7fffffc
add ecx, eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
mov dword [ebp - 0x4c], eax
imul eax, ecx, 0x13
add eax, edx
mov dword [ebp - 0x70], eax
lea eax, [ebp - 0x70]
push eax
lea eax, [ebp - 0x90]
push eax
call fcn.00501e60
xor esi, esi
add esp, 0x1c
xor edx, edx
lea edi, [esi + 0x20]
mov edi, edi
movzx ecx, byte [edx + 0x71c4b0]
lea edx, [edx + 1]
movzx eax, byte [ebp + edx - 0x91]
xor ecx, eax
or esi, ecx
sub edi, 1
jne 0x505b20
lea eax, [esi - 1]
mov esi, dword [ebx + 8]
test eax, 0x100
jne 0x505c82
mov edx, dword [ebp - 0x48]
add edx, dword [ebp - 4]
mov ecx, dword [ebp - 0xb4]
mov eax, edx
add ecx, dword [ebp - 0x44]
and edx, 0x3ffffff
shr eax, 0x1a
add ecx, eax
mov eax, ecx
shr ecx, 0x19
add ecx, dword [ebp - 0x40]
and eax, 0x1ffffff
add ecx, dword [ebp - 0xb8]
mov dword [ebp - 0x44], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x3c]
add ecx, dword [ebp - 0xbc]
mov dword [ebp - 0x40], eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
add ecx, dword [ebp - 0x38]
add ecx, dword [ebp - 0xc0]
mov dword [ebp - 0x3c], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x34]
add ecx, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
add ecx, dword [ebp - 0x30]
add ecx, dword [ebp - 0x14]
mov dword [ebp - 0x34], eax
mov eax, ecx
shr ecx, 0x1a
and eax, 0x3ffffff
add ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x18]
mov dword [ebp - 0x30], eax
mov eax, ecx
and eax, 0x1ffffff
shr ecx, 0x19
add ecx, dword [ebp - 0x28]
add ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x2c], eax
mov eax, ecx
and eax, 0x3ffffff
shr ecx, 0x1a
add ecx, dword [ebp - 0x24]
add ecx, dword [ebp - 0x20]
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 - 0x90]
push eax
call fcn.00501e60
xor esi, esi
add esp, 8
xor edx, edx
lea edi, [esi + 0x20]
jmp 0x505c40
movzx ecx, byte [edx + 0x71c4b0]
lea edx, [edx + 1]
movzx eax, byte [ebp + edx - 0x91]
xor ecx, eax
or esi, ecx
sub edi, 1
jne 0x505c40
lea eax, [esi - 1]
mov esi, dword [ebx + 8]
test eax, 0x100
jne 0x505c73
xor eax, eax
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
push 0x71b580
push esi
push esi
call fcn.00502470
add esp, 0xc
lea eax, [ebp - 0x90]
push esi
push eax
call fcn.00501e60
mov al, byte [ebp - 0x90]
add esp, 8
and al, 1
cmp al, byte [ebp - 5]
jne 0x505dab
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
and dword [ebp - 0xc], 0x3ffffff
mov dword [ebp - 4], eax
and eax, 0x1ffffff
mov dword [esi + 4], eax
mov eax, dword [ebp - 4]
shr eax, 0x19
sub eax, dword [esi + 8]
mov ecx, eax
mov dword [ebp - 4], 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
mov dword [esi + 0x20], eax
add ecx, 0x3fffffe
mov eax, ecx
shr ecx, 0x19
and eax, 0x1ffffff
mov dword [esi + 0x24], eax
imul eax, ecx, 0x13
add eax, dword [ebp - 0xc]
mov dword [esi], eax
lea eax, [esi + 0x28]
push eax
push esi
add esi, 0x78
push esi
call fcn.00502470
add esp, 0xc
mov eax, 1
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret