Function at 0x502780
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xb8
push ebx
push esi
mov esi, dword [ebp + 0x10]
xor ebx, ebx
shr esi, 3
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x28], 2
cmp esi, 0x14
je 0x5027b4
cmp esi, 0x1c
je 0x5027b4
cmp esi, 0x20
je 0x5027b4
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
push edi
mov edi, dword [ebp + 0x14]
test edi, edi
jne 0x5027ea
cmp esi, 0x14
jne 0x5027cd
call fcn.00493fe0
mov edi, eax
mov dword [ebp + 0x14], edi
jmp 0x5027f5
cmp esi, 0x1c
jne 0x5027de
call fcn.00493ff0
mov edi, eax
mov dword [ebp + 0x14], edi
jmp 0x5027f5
call fcn.00494000
mov edi, eax
mov dword [ebp + 0x14], edi
jmp 0x5027f5
push edi
call fcn.0044e690
add esp, 4
mov esi, eax
mov ecx, 0x200
cmp dword [ebp + 0xc], ecx
cmovae ecx, dword [ebp + 0xc]
add ecx, 0x3f
and ecx, 0xffffffc0
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp + 0x18]
test ecx, ecx
je 0x50284a
mov eax, dword [ebp + 0x1c]
cmp eax, esi
jae 0x502836
push 0x55
push 0x5c5d48
push 0x6e
push 0x7d
push 0xa
call fcn.004576a0
add esp, 0x14
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmova eax, esi
push eax
push ecx
lea eax, [ebp - 0xb8]
push eax
call fcn.0053f470
add esp, 0xc
call fcn.004fbb80
mov dword [ebp - 0x14], eax
test eax, eax
je 0x502e1f
call fcn.004ca1e0
mov dword [ebp + 0x10], eax
test eax, eax
je 0x502e21
push eax
call fcn.004ca2d0
mov ebx, dword [ebp + 0x10]
push ebx
call fcn.004ca080
push ebx
mov dword [ebp - 0x54], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x10], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x20], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0xc], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x58], eax
call fcn.004ca080
push ebx
mov dword [ebp - 0x30], eax
call fcn.004ca080
push ebx
mov dword [ebp - 8], eax
call fcn.004ca080
mov ebx, eax
add esp, 0x24
mov dword [ebp - 4], ebx
test ebx, ebx
je 0x502919
mov eax, dword [ebp - 0x1c]
dec eax
push eax
call fcn.004a15a0
push eax
push ebx
call fcn.004a1d80
add esp, 0xc
test eax, eax
je 0x502919
nop dword [eax]
push dword [ebp - 0x18]
xor ebx, ebx
cmp dword [ebp + 0x18], ebx
push 0
push dword [ebp + 0x2c]
sete bl
call fcn.00529660
inc dword [ebp - 0x18]
add esp, 0xc
test eax, eax
je 0x502919
cmp dword [ebp + 0x18], 0
jne 0x50292e
lea eax, [ebp - 0xb8]
push esi
push eax
call fcn.0044ca30
add esp, 8
test eax, eax
jg 0x502935
xor ebx, ebx
push dword [ebp + 0x10]
call fcn.004c9f80
mov eax, dword [ebp + 0x10]
add esp, 4
jmp 0x502e21
mov dword [ebp + 0x18], 0
push esi
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0x98]
push eax
call fcn.0053f470
push esi
lea eax, [ebp - 0xb8]
push eax
lea eax, [ebp - 0x78]
push eax
call fcn.0053f470
lea eax, [esi - 1]
add esp, 0x18
test eax, eax
js 0x502973
add byte [ebp + eax - 0x98], 1
jne 0x502973
sub eax, 1
jns 0x502964
push 0
push edi
push 0
lea eax, [ebp - 0x50]
push eax
lea eax, [ebp - 0xb8]
push esi
push eax
call fcn.00462550
add esp, 0x18
test eax, eax
je 0x502919
push 0
push edi
push 0
lea eax, [ebp - 0x78]
push eax
lea eax, [ebp - 0x98]
push esi
push eax
call fcn.00462550
add esp, 0x18
test eax, eax
je 0x502919
xor ecx, ecx
test esi, esi
jle 0x502a34
cmp esi, 0x40
jb 0x502a23
mov eax, esi
and eax, 0x8000003f
jns 0x5029ca
dec eax
or eax, 0xffffffc0
inc eax
mov edx, esi
sub edx, eax
nop
movups xmm0, xmmword [ebp + ecx - 0x50]
movups xmm1, xmmword [ebp + ecx - 0x78]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x50], xmm1
movups xmm0, xmmword [ebp + ecx - 0x40]
movups xmm1, xmmword [ebp + ecx - 0x68]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x40], xmm1
movups xmm0, xmmword [ebp + ecx - 0x30]
movups xmm1, xmmword [ebp + ecx - 0x58]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x30], xmm1
movups xmm0, xmmword [ebp + ecx - 0x20]
movups xmm1, xmmword [ebp + ecx - 0x48]
pxor xmm1, xmm0
movups xmmword [ebp + ecx - 0x20], xmm1
add ecx, 0x40
cmp ecx, edx
jl 0x5029d0
cmp ecx, esi
jge 0x502a34
mov al, byte [ebp + ecx - 0x78]
xor byte [ebp + ecx - 0x50], al
inc ecx
cmp ecx, esi
jl 0x502a27
push dword [ebp - 0xc]
or byte [ebp - 0x50], 0x80
lea eax, [ebp - 0x50]
or byte [ebp + esi - 0x51], 1
push esi
push eax
call fcn.004a0930
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp + 0x2c]
push ebx
push dword [ebp + 0x10]
push 0x40
push dword [ebp - 0xc]
call fcn.00529b40
add esp, 0x14
test eax, eax
jg 0x502a78
je 0x5028e0
jmp 0x502919
mov ebx, dword [ebp + 0x2c]
push 0
push 2
push ebx
call fcn.00529660
add esp, 0xc
test eax, eax
je 0x502919
push 0
push 3
push ebx
call fcn.00529660
add esp, 0xc
test eax, eax
je 0x502919
mov ecx, dword [ebp - 0x1c]
mov eax, 0xcccccccd
mov ebx, dword [ebp - 0x54]
xor edi, edi
mov dword [ebp - 0x24], edi
lea ecx, [ecx - 1]
mul ecx
mov eax, edx
shr eax, 7
mov dword [ebp - 0x2c], eax
test edi, edi
je 0x502adc
push edi
push 0
push dword [ebp + 0x2c]
call fcn.00529660
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp - 0x20]
call fcn.004a15f0
xor edi, edi
add esp, 4
cmp dword [ebp - 0x2c], edi
jl 0x502b85
lea eax, [esi - 1]
test eax, eax
js 0x502b0f
nop dword [eax]
add byte [ebp + eax - 0x98], 1
jne 0x502b0f
sub eax, 1
jns 0x502b00
push 0
push dword [ebp + 0x14]
lea eax, [ebp - 0x50]
push 0
push eax
lea eax, [ebp - 0x98]
push esi
push eax
call fcn.00462550
add esp, 0x18
test eax, eax
je 0x502919
push ebx
lea eax, [ebp - 0x50]
push esi
push eax
call fcn.004a0930
add esp, 0xc
test eax, eax
je 0x502919
lea eax, [esi*8]
imul eax, edi
push eax
push ebx
push ebx
call fcn.004a1d80
add esp, 0xc
test eax, eax
je 0x502919
mov eax, dword [ebp - 0x20]
push ebx
push eax
push eax
call fcn.004d07b0
add esp, 0xc
test eax, eax
je 0x502919
inc edi
cmp edi, dword [ebp - 0x2c]
jle 0x502af2
mov eax, dword [ebp - 0x1c]
mov edi, dword [ebp - 0x20]
dec eax
push eax
push edi
call fcn.004a1150
add esp, 8
test eax, eax
je 0x502919
push edi
mov edi, dword [ebp - 0x58]
push edi
call fcn.004a0eb0
add esp, 8
test eax, eax
je 0x502919
push dword [ebp - 4]
push edi
push edi
call fcn.004d07b0
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp - 0xc]
push ebx
call fcn.004a1eb0
add esp, 8
test eax, eax
je 0x502919
push dword [ebp + 0x10]
push ebx
push edi
push dword [ebp - 0x30]
push 0
call fcn.004fb610
add esp, 0x14
test eax, eax
je 0x502919
call fcn.004a15a0
push eax
push dword [ebp - 0x30]
push ebx
call fcn.004d0840
add esp, 0xc
test eax, eax
je 0x502919
push ebx
push edi
mov edi, dword [ebp - 8]
push edi
call fcn.004d0840
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp - 4]
push edi
call fcn.004a0b20
add esp, 8
test eax, eax
js 0x502c56
mov edi, dword [ebp + 0x2c]
push edi
push 1
push dword [ebp + 0x10]
push 0x40
push dword [ebp - 8]
call fcn.00529b40
add esp, 0x14
test eax, eax
jg 0x502c71
jne 0x502919
mov edi, dword [ebp - 0x24]
inc edi
mov dword [ebp - 0x24], edi
cmp edi, 0x1000
jl 0x502ac2
mov edi, dword [ebp + 0x14]
jmp 0x5028e0
push 1
push 2
push edi
call fcn.00529660
add esp, 0xc
test eax, eax
je 0x502919
call fcn.004a15a0
push eax
push dword [ebp - 8]
push dword [ebp - 4]
call fcn.004d0840
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp + 0x10]
push dword [ebp - 0xc]
push dword [ebp - 4]
push 0
push ebx
call fcn.004fb610
add esp, 0x14
test eax, eax
je 0x502919
push 2
push dword [ebp - 4]
call fcn.004a14e0
add esp, 8
test eax, eax
je 0x502919
push dword [ebp + 0x10]
push dword [ebp - 8]
push dword [ebp - 0x14]
call fcn.004fbc00
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp - 0x14]
push dword [ebp + 0x10]
push dword [ebp - 8]
push ebx
push dword [ebp - 4]
push dword [ebp - 0x10]
call fcn.004fa180
add esp, 0x18
test eax, eax
je 0x502919
nop dword [eax]
push dword [ebp - 0x10]
call fcn.004a10d0
add esp, 4
test eax, eax
je 0x502d5e
call fcn.004a15a0
push eax
mov eax, dword [ebp - 4]
push eax
push eax
call fcn.004d07b0
add esp, 0xc
test eax, eax
je 0x502919
push dword [ebp - 0x14]
inc dword [ebp - 0x28]
push dword [ebp + 0x10]
push dword [ebp - 8]
push ebx
push dword [ebp - 4]
push dword [ebp - 0x10]
call fcn.004fa180
add esp, 0x18
test eax, eax
jne 0x502d10
jmp 0x502919
push 1
push 3
push edi
call fcn.00529660
add esp, 0xc
test eax, eax
je 0x502919
mov ebx, 1
nop dword [eax + eax]
mov edi, dword [ebp + 8]
push dword [edi + 8]
call fcn.004a0fd0
push dword [edi + 0xc]
call fcn.004a0fd0
push dword [edi + 0x10]
call fcn.004a0fd0
push dword [ebp - 8]
call fcn.004a0f10
push dword [ebp - 0xc]
mov dword [edi + 8], eax
call fcn.004a0f10
push dword [ebp - 0x10]
mov dword [edi + 0xc], eax
call fcn.004a0f10
add esp, 0x18
mov dword [edi + 0x10], eax
cmp dword [edi + 8], 0
je 0x502919
cmp dword [edi + 0xc], 0
je 0x502919
test eax, eax
je 0x502919
mov eax, dword [ebp + 0x24]
test eax, eax
je 0x502de7
mov ecx, dword [ebp - 0x24]
mov dword [eax], ecx
mov eax, dword [ebp + 0x28]
test eax, eax
je 0x502df3
mov ecx, dword [ebp - 0x28]
mov dword [eax], ecx
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x50291b
push esi
lea ecx, [ebp - 0xb8]
push ecx
push eax
call fcn.0053f470
add esp, 0xc
push dword [ebp + 0x10]
call fcn.004c9f80
mov eax, dword [ebp + 0x10]
add esp, 4
jmp 0x502e21
xor eax, eax
push eax
call fcn.004c9ff0
push dword [ebp - 0x14]
call fcn.004fbb30
add esp, 8
mov eax, ebx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret