Function at 0x535728
Capabilities:
Encode data using xor
Encrypt data using tea

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x58
mov eax, dword [0x7b088c]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x2c], eax
mov eax, dword [ebp + 0x14]
push esi
mov dword [ebp - 0x3c], eax
mov eax, dword [ebp + 0x18]
push edi
mov dword [ebp - 0x48], eax
xor edi, edi
lea eax, [ebp - 0x24]
mov esi, edi
sub ebx, eax
lea eax, [ebx + esi*4]
push dword [ebp + eax - 0x24]
call fcn.006aefd4
mov dword [ebp + esi*4 - 0x24], eax
inc esi
pop ecx
cmp esi, 4
jl 0x535759
mov eax, dword [ebp + 0xc]
and eax, reloc.WS2_32.dll_getsockopt
jns 0x53577f
dec eax
or eax, 0xfffffff8
inc eax
jne 0x535cbc
cmp dword [ebp + 0xc], 0x10
jl 0x535cbc
mov esi, dword [ebp - 0x2c]
push dword [esi]
call fcn.006aefd4
push dword [esi + 4]
mov ebx, eax
call fcn.006aefd4
pop ecx
pop ecx
mov esi, eax
mov eax, 0xe3779b90
push 0x10
mov dword [ebp - 0x54], eax
mov edx, eax
pop edi
mov ecx, ebx
mov eax, ebx
shr ecx, 5
add ecx, dword [ebp - 0x18]
shl eax, 4
add eax, dword [ebp - 0x1c]
xor ecx, eax
lea eax, [edx + ebx]
xor ecx, eax
sub esi, ecx
mov ecx, esi
mov eax, esi
shl ecx, 4
add ecx, dword [ebp - 0x24]
shr eax, 5
add eax, dword [ebp - 0x20]
xor ecx, eax
lea eax, [edx + esi]
xor ecx, eax
lea edx, [edx + 0x61c88647]
sub ebx, ecx
sub edi, 1
jne 0x5357b4
push ebx
call fcn.006aefd4
mov ebx, eax
push esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0xc], ebx
call fcn.006aefd4
pop ecx
pop ecx
mov ecx, dword [ebp + 0xc]
movzx esi, bl
and esi, 7
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], eax
sub ecx, esi
mov eax, dword [ebp - 0x48]
sub ecx, 0xa
cmp dword [eax], ecx
jl 0x535cbc
test ecx, ecx
js 0x535cbc
mov edx, dword [ebp - 0x2c]
xorps xmm0, xmm0
mov dword [eax], ecx
lea eax, [ebp - 0x14]
push 8
pop ecx
mov dword [ebp - 0x38], eax
mov eax, edx
add edx, ecx
mov dword [ebp - 0x4c], ecx
inc esi
movlpd qword [ebp - 0x14], xmm0
xor ecx, ecx
mov dword [ebp - 0x34], eax
inc ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x40], esi
mov dword [ebp - 0x50], ecx
mov dword [ebp - 0x30], 0xf
cmp esi, 8
jge 0x535871
inc esi
inc ecx
mov dword [ebp - 0x50], ecx
jmp 0x535924
jne 0x535927
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x30]
mov dword [ebp - 0x34], edx
cmp eax, dword [ebp + 0xc]
jge 0x535cbc
xor ebx, dword [edx]
mov esi, dword [ebp - 0x28]
xor esi, dword [edx + 4]
push ebx
call fcn.006aefd4
push esi
mov ebx, eax
call fcn.006aefd4
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 0x40], 0x10
mov edi, 0xe3779b90
mov edx, ebx
lea eax, [edi + ebx]
shr edx, 5
mov ecx, ebx
add edx, dword [ebp - 0x18]
shl ecx, 4
add ecx, dword [ebp - 0x1c]
xor edx, ecx
xor edx, eax
sub esi, edx
mov ecx, esi
mov eax, esi
shl ecx, 4
add ecx, dword [ebp - 0x24]
shr eax, 5
add eax, dword [ebp - 0x20]
xor ecx, eax
lea eax, [edi + esi]
xor ecx, eax
lea edi, [edi + 0x61c88647]
sub ebx, ecx
sub dword [ebp - 0x40], 1
jne 0x5358af
push ebx
xor edi, edi
call fcn.006aefd4
mov ebx, eax
push esi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0xc], ebx
call fcn.006aefd4
mov edx, dword [ebp - 0x2c]
mov esi, edi
pop ecx
pop ecx
mov ecx, dword [ebp - 0x50]
mov dword [ebp - 0x28], eax
mov dword [ebp - 8], eax
push 8
pop eax
add dword [ebp - 0x4c], eax
add edx, eax
add dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x40], esi
cmp ecx, 2
jle 0x535862
mov eax, dword [ebp - 0x48]
mov ebx, dword [eax]
mov dword [ebp - 0x30], ebx
test esi, esi
jle 0x535a5d
push 8
pop ecx
mov eax, ecx
sub eax, esi
cmp ebx, eax
jle 0x535a5d
cmp esi, ecx
jge 0x53597b
mov edi, dword [ebp - 0x38]
lea ecx, [ebp - 0xc]
sub edi, ecx
sub ebx, eax
mov dword [ebp - 0x30], ebx
mov ebx, dword [ebp - 0x3c]
lea eax, [ebp - 0xc]
add eax, esi
mov cl, byte [edi + eax]
xor cl, byte [eax]
mov byte [ebx], cl
inc ebx
inc esi
cmp esi, 8
jl 0x535963
mov dword [ebp - 0x3c], ebx
xor edi, edi
mov eax, dword [ebp - 0x34]
mov dword [ebp - 0x38], eax
mov eax, dword [ebp - 0x4c]
add eax, 7
mov dword [ebp - 0x34], edx
cmp eax, dword [ebp + 0xc]
jge 0x535cbc
mov esi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x44]
mov eax, dword [ebp - 0x28]
xor edx, dword [esi]
xor eax, dword [esi + 4]
push edx
mov dword [ebp - 0x28], eax
call fcn.006aefd4
push dword [ebp - 0x28]
mov ebx, eax
call fcn.006aefd4
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 0x48], 0x10
mov edi, 0xe3779b90
mov edx, ebx
lea eax, [edi + ebx]
shr edx, 5
mov ecx, ebx
add edx, dword [ebp - 0x18]
shl ecx, 4
add ecx, dword [ebp - 0x1c]
xor edx, ecx
xor edx, eax
sub esi, edx
mov ecx, esi
mov eax, esi
shl ecx, 4
add ecx, dword [ebp - 0x24]
shr eax, 5
add eax, dword [ebp - 0x20]
xor ecx, eax
lea eax, [edi + esi]
xor ecx, eax
lea edi, [edi + 0x61c88647]
sub ebx, ecx
sub dword [ebp - 0x48], 1
jne 0x5359c4
push ebx
call fcn.006aefd4
push esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], eax
call fcn.006aefd4
mov ebx, dword [ebp - 0x30]
xor edi, edi
pop ecx
pop ecx
mov ecx, eax
mov esi, edi
push 8
pop eax
add dword [ebp - 0x2c], eax
add dword [ebp - 0x4c], eax
mov dword [ebp - 0x28], ecx
mov dword [ebp - 8], ecx
mov dword [ebp - 0x40], esi
cmp ebx, eax
jl 0x535a90
mov eax, dword [ebp - 0x38]
mov edx, dword [ebp - 0x3c]
push 8
mov ecx, dword [eax]
mov eax, dword [eax + 4]
xor eax, dword [ebp - 0x28]
xor ecx, dword [ebp - 0x44]
mov dword [edx + 4], eax
pop eax
mov dword [edx], ecx
mov esi, eax
add edx, eax
mov dword [ebp - 0x40], esi
sub ebx, eax
mov dword [ebp - 0x3c], edx
mov dword [ebp - 0x30], ebx
mov ecx, dword [ebp - 0x28]
mov eax, ebx
cdq
and edx, 7
add eax, edx
mov edx, dword [ebp - 0x4c]
sar eax, 3
mov dword [ebp - 0x58], eax
lea edx, [edx + eax*8]
cmp edx, dword [ebp + 0xc]
jg 0x535cbc
mov edx, dword [ebp - 0x44]
test eax, eax
jle 0x535b90
mov esi, dword [ebp - 0x2c]
mov dword [ebp - 0x50], eax
jmp 0x535ac8
test ebx, ebx
je 0x535a60
mov edx, dword [ebp - 0x38]
lea eax, [ebp - 0xc]
mov edi, dword [ebp - 0x3c]
sub edx, eax
cmp esi, 8
jge 0x535ab4
lea eax, [edx + esi]
mov al, byte [ebp + eax - 0xc]
xor al, byte [ebp + esi - 0xc]
mov byte [edi], al
inc edi
inc esi
dec ebx
test ebx, ebx
jne 0x535a9f
mov dword [ebp - 0x3c], edi
xor edi, edi
mov dword [ebp - 0x30], ebx
mov dword [ebp - 0x40], esi
jmp 0x535a60
mov ecx, dword [ebp - 0x28]
xor edx, dword [esi]
xor ecx, dword [esi + 4]
mov edi, dword [ebp - 0x34]
push edx
mov dword [ebp - 0x38], edi
mov dword [ebp - 0x34], esi
mov dword [ebp - 0x28], ecx
call fcn.006aefd4
push dword [ebp - 0x28]
mov ebx, eax
call fcn.006aefd4
pop ecx
pop ecx
mov esi, eax
mov dword [ebp - 0x48], 0x10
mov edi, 0xe3779b90
mov edx, ebx
lea eax, [edi + ebx]
shr edx, 5
mov ecx, ebx
add edx, dword [ebp - 0x18]
shl ecx, 4
add ecx, dword [ebp - 0x1c]
xor edx, ecx
xor edx, eax
sub esi, edx
mov ecx, esi
mov eax, esi
shl ecx, 4
add ecx, dword [ebp - 0x24]
shr eax, 5
add eax, dword [ebp - 0x20]
xor ecx, eax
lea eax, [edi + esi]
xor ecx, eax
lea edi, [edi + 0x61c88647]
sub ebx, ecx
sub dword [ebp - 0x48], 1
jne 0x535af9
push ebx
call fcn.006aefd4
push esi
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], eax
call fcn.006aefd4
mov edi, dword [ebp - 0x38]
mov ebx, dword [ebp - 0x3c]
mov edx, dword [ebp - 0x44]
mov esi, dword [ebp - 0x2c]
pop ecx
pop ecx
mov ecx, dword [edi]
mov dword [ebp - 0x28], eax
xor ecx, edx
mov dword [ebp - 8], eax
mov eax, dword [edi + 4]
xor eax, dword [ebp - 0x28]
mov dword [ebx], ecx
push 8
pop ecx
mov dword [ebx + 4], eax
add esi, ecx
add ebx, ecx
mov dword [ebp - 0x2c], esi
sub dword [ebp - 0x50], 1
mov dword [ebp - 0x3c], ebx
jne 0x535ac5
mov esi, dword [ebp - 0x40]
xor edi, edi
mov ebx, dword [ebp - 0x30]
mov eax, dword [ebp - 0x58]
jmp 0x535b93
push 8
pop ecx
test eax, eax
cmovg esi, ecx
and ebx, reloc.WS2_32.dll_getsockopt
jns 0x535ba5
dec ebx
or ebx, 0xfffffff8
inc ebx
mov dword [ebp - 0x30], ebx
test ebx, ebx
jle 0x535c91
lea eax, [eax*8 + 7]
add eax, dword [ebp - 0x4c]
cmp eax, dword [ebp + 0xc]
jge 0x535cbc
mov eax, dword [ebp - 0x2c]
mov edi, dword [ebp - 0x28]
xor edx, dword [eax]
xor edi, dword [eax + 4]
push edx
call fcn.006aefd4
push edi
mov esi, eax
call fcn.006aefd4
pop ecx
pop ecx
push 0x10
mov edi, eax
pop ebx
mov eax, dword [ebp - 0x54]
mov edx, esi
shr edx, 5
mov ecx, esi
add edx, dword [ebp - 0x18]
add eax, esi
shl ecx, 4
add ecx, dword [ebp - 0x1c]
xor edx, ecx
xor edx, eax
sub edi, edx
mov edx, dword [ebp - 0x54]
mov ecx, edi
mov eax, edi
shl ecx, 4
add ecx, dword [ebp - 0x24]
shr eax, 5
add eax, dword [ebp - 0x20]
xor ecx, eax
lea eax, [edx + edi]
xor ecx, eax
add edx, 0x61c88647
sub esi, ecx
mov dword [ebp - 0x54], edx
sub ebx, 1
jne 0x535be3
push esi
call fcn.006aefd4
push edi
mov dword [ebp - 0xc], eax
call fcn.006aefd4
mov ebx, dword [ebp - 0x30]
mov dword [ebp - 8], eax
pop ecx
pop ecx
push 0
pop edi
test ebx, ebx
jle 0x535c6d
mov ecx, dword [ebp - 0x34]
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0x3c]
sub ecx, eax
lea eax, [ecx + edi]
mov al, byte [ebp + eax - 0xc]
xor al, byte [ebp + edi - 0xc]
mov byte [edx], al
inc edx
inc edi
cmp edi, ebx
jl 0x535c51
push 8
pop edx
cmp edi, edx
jge 0x535cb7
jmp 0x535c70
push 8
pop edx
mov eax, dword [ebp - 0x34]
lea ecx, [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0x34], eax
lea ecx, [ebp - 0xc]
add ecx, edi
mov al, byte [ecx + eax]
cmp al, byte [ecx]
jne 0x535cbc
mov eax, dword [ebp - 0x34]
inc edi
cmp edi, edx
jl 0x535c7b
jmp 0x535cb7
cmp esi, ecx
jge 0x535cb7
mov eax, dword [ebp - 0x38]
lea ecx, [ebp - 0xc]
sub eax, ecx
mov dword [ebp - 0x38], eax
lea ecx, [ebp - 0xc]
add ecx, esi
mov al, byte [ecx + eax]
cmp al, byte [ecx]
jne 0x535cbc
push 8
pop eax
inc esi
cmp esi, eax
mov eax, dword [ebp - 0x38]
jl 0x535ca0
xor eax, eax
inc eax
jmp 0x535cbe
xor eax, eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00682c16
mov esp, ebp
pop ebp
ret