Function at 0x580520
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x72eb50
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x24
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebp - 0x20], ebx
cmp dword [ebx + 0xc], 0
mov dword [ebx + 0x4c], 0
je 0x5809e0
push 0x2c
mov dword [ebp - 0x18], 0
call fcn.00503d60
add esp, 4
lea ecx, [ebp - 0x1c]
mov dword [eax], eax
push dword [ebp - 0x20]
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x1c], eax
push eax
mov eax, dword [ebx + 0x24]
push dword [eax + 4]
call fcn.00576100
mov ecx, dword [ebp - 0x1c]
mov dword [ecx + 4], eax
mov esi, dword [ebp - 0x1c]
mov eax, dword [ebx + 0x28]
mov dword [ebp - 0x18], eax
mov edx, dword [esi + 4]
cmp byte [edx + 0xd], 0
jne 0x5805d5
mov ecx, dword [edx]
cmp byte [ecx + 0xd], 0
jne 0x5805b4
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x5805a8
mov dword [esi], edx
mov edx, dword [ebp - 0x1c]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
jne 0x5805d0
mov ecx, eax
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
je 0x5805c5
mov dword [edx + 8], ecx
jmp 0x5805dd
mov dword [esi], esi
mov eax, dword [ebp - 0x1c]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x1c]
mov esi, dword [eax]
mov dword [ebp - 0x10], esi
cmp esi, eax
je 0x580647
nop dword [eax]
mov edi, dword [ebx + 0x4c]
lea eax, [esi + 0x10]
push eax
call fcn.004ca020
mov ecx, edi
mov edx, edi
shr ecx, 2
add esp, 4
add ecx, 0x9e3779b9
shl edx, 6
add edx, ecx
add edx, eax
xor edx, edi
mov dword [ebx + 0x4c], edx
mov eax, edx
movzx ecx, byte [esi + 0x28]
shr eax, 2
add ecx, eax
mov eax, edx
shl eax, 6
add ecx, 0x9e3779b9
add eax, ecx
lea ecx, [ebp - 0x10]
xor eax, edx
mov dword [ebx + 0x4c], eax
call fcn.004c43f0
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 0x1c]
cmp esi, eax
jne 0x5805f0
push dword [eax + 4]
lea eax, [ebp - 0x1c]
push eax
mov ecx, eax
call fcn.0049a2f0
push 0x2c
push dword [ebp - 0x1c]
call fcn.00503df0
push 0x30
mov dword [ebp - 0x24], 0
call fcn.00503d60
add esp, 0xc
lea ecx, [ebp - 0x28]
mov dword [eax], eax
push dword [ebp - 0x20]
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x28], eax
push eax
mov eax, dword [ebx + 0x2c]
push dword [eax + 4]
call fcn.00575df0
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 4], eax
mov esi, dword [ebp - 0x28]
mov eax, dword [ebx + 0x30]
mov dword [ebp - 0x24], eax
mov edx, dword [esi + 4]
cmp byte [edx + 0xd], 0
jne 0x5806e0
mov ecx, dword [edx]
cmp byte [ecx + 0xd], 0
jne 0x5806bf
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x5806b3
mov dword [esi], edx
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
jne 0x5806db
mov ecx, eax
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
je 0x5806d0
mov dword [edx + 8], ecx
jmp 0x5806e8
mov dword [esi], esi
mov eax, dword [ebp - 0x28]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [eax]
mov dword [ebp - 0x18], esi
cmp esi, eax
je 0x58077e
mov edi, dword [ebx + 0x4c]
nop dword [eax + eax]
lea eax, [esi + 0x10]
push eax
call fcn.004ca020
mov ecx, edi
mov edx, edi
shr ecx, 2
add esp, 4
add ecx, 0x9e3779b9
shl edx, 6
add ecx, edx
xorps xmm1, xmm1
add ecx, eax
xor ecx, edi
mov dword [ebx + 0x4c], ecx
movsd xmm0, qword [esi + 0x28]
ucomisd xmm0, xmm1
mov dword [ebp - 0x10], ecx
lahf
test ah, 0x44
jp 0x58073e
xor eax, eax
jmp 0x580754
lea eax, [ebp - 0x30]
movsd qword [ebp - 0x30], xmm0
push 8
push eax
call fcn.00580aa0
mov ecx, dword [ebp - 0x10]
add esp, 8
mov edi, ecx
shr ecx, 2
shl edi, 6
add ecx, 0x9e3779b9
add edi, eax
add edi, ecx
lea ecx, [ebp - 0x18]
xor edi, dword [ebp - 0x10]
mov dword [ebx + 0x4c], edi
call fcn.004c43f0
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
cmp esi, eax
jne 0x580700
push dword [eax + 4]
lea eax, [ebp - 0x28]
push eax
mov ecx, eax
call fcn.00576480
push 0x30
push dword [ebp - 0x28]
call fcn.00503df0
push 0x30
mov dword [ebp - 0x24], 0
call fcn.00503d60
add esp, 0xc
lea ecx, [ebp - 0x28]
mov dword [eax], eax
push dword [ebp - 0x20]
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x28], eax
push eax
mov eax, dword [ebx + 0x34]
push dword [eax + 4]
call fcn.00576000
mov ecx, dword [ebp - 0x28]
mov dword [ecx + 4], eax
mov esi, dword [ebp - 0x28]
mov eax, dword [ebx + 0x38]
mov dword [ebp - 0x24], eax
mov edx, dword [esi + 4]
cmp byte [edx + 0xd], 0
jne 0x580820
mov ecx, dword [edx]
cmp byte [ecx + 0xd], 0
jne 0x5807fc
nop word [eax + eax]
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x5807f0
mov dword [esi], edx
mov edx, dword [ebp - 0x28]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
jne 0x58081b
nop dword [eax]
mov ecx, eax
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
je 0x580810
mov dword [edx + 8], ecx
jmp 0x580828
mov dword [esi], esi
mov eax, dword [ebp - 0x28]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x28]
mov esi, dword [eax]
mov dword [ebp - 0x18], esi
cmp esi, eax
je 0x5808af
mov edi, dword [ebx + 0x4c]
lea eax, [esi + 0x10]
push eax
call fcn.004ca020
mov edx, edi
mov ecx, edi
shl edx, 6
add esp, 4
add edx, 0x9e3779b9
shr ecx, 2
add edx, ecx
add eax, edx
xor eax, edi
mov dword [ebx + 0x4c], eax
mov edx, dword [esi + 0x2c]
mov edi, dword [esi + 0x28]
mov dword [ebp - 0x10], eax
test edx, edx
jg 0x580871
jl 0x58086f
test edi, edi
jae 0x580871
not edx
mov eax, edx
mov ecx, edx
shl eax, 6
add eax, edi
shr ecx, 2
add ecx, eax
xor ecx, edx
mov edx, dword [ebp - 0x10]
mov eax, edx
mov edi, edx
shr edi, 2
shl eax, 6
add edi, 0x9e3779b9
add ecx, eax
add edi, ecx
lea ecx, [ebp - 0x18]
xor edi, edx
mov dword [ebx + 0x4c], edi
call fcn.004c43f0
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x28]
cmp esi, eax
jne 0x580837
push dword [eax + 4]
lea eax, [ebp - 0x28]
push eax
mov ecx, eax
call fcn.00576480
push 0x30
push dword [ebp - 0x28]
call fcn.00503df0
push 0x40
mov dword [ebp - 0x10], 0
call fcn.00503d60
add esp, 0xc
lea ecx, [ebp - 0x14]
mov dword [eax], eax
push dword [ebp - 0x20]
mov dword [eax + 4], eax
mov dword [eax + 8], eax
mov word [eax + 0xc], 0x101
mov dword [ebp - 0x14], eax
push eax
mov eax, dword [ebx + 0x44]
push dword [eax + 4]
call fcn.00575ef0
mov ecx, dword [ebp - 0x14]
mov dword [ecx + 4], eax
mov esi, dword [ebp - 0x14]
mov eax, dword [ebx + 0x48]
mov dword [ebp - 0x10], eax
mov edx, dword [esi + 4]
cmp byte [edx + 0xd], 0
jne 0x580950
mov ecx, dword [edx]
cmp byte [ecx + 0xd], 0
jne 0x58092c
nop dword [eax + eax]
mov eax, dword [ecx]
mov edx, ecx
mov ecx, eax
cmp byte [eax + 0xd], 0
je 0x580920
mov dword [esi], edx
mov edx, dword [ebp - 0x14]
mov ecx, dword [edx + 4]
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
jne 0x58094b
nop dword [eax]
mov ecx, eax
mov eax, dword [ecx + 8]
cmp byte [eax + 0xd], 0
je 0x580940
mov dword [edx + 8], ecx
jmp 0x580958
mov dword [esi], esi
mov eax, dword [ebp - 0x14]
mov dword [eax + 8], eax
mov eax, dword [ebp - 0x14]
mov esi, dword [eax]
mov dword [ebp - 0x18], esi
cmp esi, eax
je 0x5809c5
mov edi, dword [ebx + 0x4c]
lea eax, [esi + 0x10]
push eax
call fcn.004ca020
mov ebx, edi
mov ecx, edi
shl ebx, 6
add eax, 0x9e3779b9
shr ecx, 2
add esi, 0x28
add ebx, ecx
add ebx, eax
mov eax, dword [ebp - 0x20]
xor ebx, edi
push esi
mov dword [eax + 0x4c], ebx
call fcn.004ca020
mov ecx, ebx
mov edx, ebx
shr ecx, 2
add esp, 8
add ecx, 0x9e3779b9
shl edx, 6
add edx, ecx
lea ecx, [ebp - 0x18]
add eax, edx
xor eax, ebx
mov ebx, dword [ebp - 0x20]
mov dword [ebx + 0x4c], eax
call fcn.004c43f0
mov esi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
cmp esi, eax
jne 0x580964
push dword [eax + 4]
lea eax, [ebp - 0x14]
push eax
mov ecx, eax
call fcn.004c3920
push 0x40
push dword [ebp - 0x14]
call fcn.00503df0
add esp, 8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret