Function at 0x580100
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
push 0xffffffffffffffff
push 0x5b75a0
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x288
mov eax, dword [0x5fa040]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
mov dword [ebp - 0x288], esi
cmp byte [esi + 0x38], 0
je 0x580570
push 0x602dec
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x5fabe8], 0
jne 0x5801ec
mov eax, dword [esi + 0x3c]
cmp eax, dword [0x5fabec]
jne 0x5801ec
lea ecx, [esi + 0x40]
mov edx, 0x5fabf0
mov edi, 0xc
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x5801ec
add ecx, 4
add edx, 4
sub edi, 4
jae 0x580183
lea ecx, [esi + 0x50]
mov edx, 0x5fac00
call fcn.004cb160
test al, al
je 0x5801ec
movups xmm0, xmmword [0x5fac08]
movups xmmword [esi + 0x58], xmm0
movups xmm0, xmmword [0x5fac18]
movups xmmword [esi + 0x68], xmm0
mov eax, dword [0x5fac28]
mov ecx, dword [0x5fac2c]
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], ecx
movups xmm0, xmmword [0x5fac30]
movups xmmword [esi + 0x80], xmm0
movups xmm0, xmmword [0x5fac40]
movups xmmword [esi + 0x90], xmm0
mov byte [esi + 0x38], 0
push 0x602dec
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esi + 0x38], 0
je 0x580570
push dword [esi + 0x54]
lea ecx, [ebp - 0x280]
push dword [esi + 0x50]
call fcn.0057eb50
mov ecx, 0x40
lea esi, [ebp - 0x280]
lea edi, [ebp - 0x180]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x288]
lea ecx, [ebp - 0x180]
push 0x10
lea edx, [esi + 0x40]
call fcn.00464180
add esp, 4
mov dword [ebp - 0x40], 0x1000000
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x180]
push 4
call fcn.00464180
add esp, 4
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x180]
call fcn.00464c60
push 0x20
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x100]
call fcn.00464180
add esp, 4
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x100]
call fcn.00464c60
mov ecx, dword [esi + 0x3c]
mov edx, 1
movaps xmm0, xmmword [ebp - 0x40]
movaps xmm1, xmmword [ebp - 0x30]
shl edx, cl
dec edx
movaps xmmword [ebp - 0x80], xmm0
xor eax, eax
movaps xmmword [ebp - 0x70], xmm1
mov dword [ebp - 0x284], edx
mov dword [ebp - 0x28c], eax
mov ecx, eax
mov dword [ebp - 0x290], ecx
test edx, edx
je 0x580361
mov ecx, 0x40
lea esi, [ebp - 0x280]
lea edi, [ebp - 0x180]
rep movsd dword es:[edi], dword [esi]
push 0x20
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x180]
call fcn.00464180
add esp, 4
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x180]
call fcn.00464c60
push 0x20
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x100]
call fcn.00464180
add esp, 4
lea edx, [ebp - 0x40]
lea ecx, [ebp - 0x100]
call fcn.00464c60
xor eax, eax
nop word [eax + eax]
movups xmm0, xmmword [ebp + eax - 0x80]
movups xmm1, xmmword [ebp + eax - 0x40]
xorps xmm1, xmm0
movups xmmword [ebp + eax - 0x80], xmm1
add eax, 0x10
cmp eax, 0x20
jb 0x580320
sub dword [ebp - 0x284], 1
jne 0x5802c0
movaps xmm1, xmmword [ebp - 0x70]
movaps xmm0, xmmword [ebp - 0x80]
mov eax, dword [ebp - 0x28c]
mov esi, dword [ebp - 0x288]
mov ecx, dword [ebp - 0x290]
test eax, eax
jne 0x58038b
movups xmmword [esi + 0x58], xmm0
movups xmmword [esi + 0x68], xmm1
lea eax, [ecx + 1]
mov dword [ebp - 0x284], 0x10
mov dword [ebp - 0x28c], eax
mov dword [ebp - 0x290], eax
jmp 0x5802c0
cmp eax, 1
jne 0x5803a0
movups xmmword [esi + 0x80], xmm0
movups xmmword [esi + 0x90], xmm1
jmp 0x58036d
lea ecx, [ebp - 0x60]
inc eax
mov dword [ebp - 0x28c], eax
mov edx, 0x10
mov dword [ebp - 0x284], edx
movups xmmword [ecx], xmm0
movups xmmword [ecx + 0x10], xmm1
cmp eax, 3
jb 0x5802b0
mov al, byte [ebp - 0x60]
mov ecx, 8
mov byte [esi + 0x78], al
mov al, byte [ebp - 0x5f]
mov byte [esi + 0x79], al
mov al, byte [ebp - 0x5e]
lea edx, [ecx + 5]
mov byte [esi + 0x7a], al
lea edi, [ecx + 3]
mov al, byte [ebp - 0x5d]
mov byte [esi + 0x7b], al
mov al, byte [ebp - 0x5c]
mov byte [esi + 0x7c], al
mov al, byte [ebp - 0x5b]
mov byte [esi + 0x7d], al
mov al, byte [ebp - 0x5a]
mov byte [esi + 0x7e], al
mov al, byte [ebp - 0x59]
mov byte [esi + 0x7f], al
mov dword [ebp - 0x288], ecx
mov dword [ebp - 0x284], 9
mov eax, dword [ebp - 0x284]
and ecx, 7
mov al, byte [ebp + eax - 0x61]
xor byte [ecx + esi + 0x78], al
mov eax, dword [ebp - 0x284]
mov ecx, dword [ebp - 0x284]
and ecx, 7
mov al, byte [ebp + eax - 0x60]
xor byte [ecx + esi + 0x78], al
lea ecx, [edi - 1]
mov al, byte [ebp + edi - 0x61]
and ecx, 7
xor byte [ecx + esi + 0x78], al
mov ecx, edi
mov al, byte [ebp + edi - 0x60]
and ecx, 7
add edi, 6
xor byte [ecx + esi + 0x78], al
lea ecx, [edx - 1]
mov al, byte [ebp + edx - 0x61]
and ecx, 7
xor byte [ecx + esi + 0x78], al
mov ecx, edx
mov al, byte [ebp + edx - 0x60]
and ecx, 7
add edx, 6
xor byte [ecx + esi + 0x78], al
mov eax, dword [ebp - 0x284]
mov ecx, dword [ebp - 0x288]
add eax, 6
add ecx, 6
mov dword [ebp - 0x284], eax
mov dword [ebp - 0x288], ecx
cmp eax, 0x21
jb 0x580410
push 0x602dec
mov byte [esi + 0x38], 0
mov dword [ebp - 0x288], 0x602dec
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
xor ecx, ecx
mov al, byte [esi + 0x38]
mov byte [0x5fabe8], al
mov eax, dword [esi + 0x3c]
mov dword [0x5fabec], eax
nop dword [eax]
mov al, byte [esi + ecx + 0x40]
mov byte [ecx + 0x5fabf0], al
inc ecx
cmp ecx, 0x10
jb 0x5804d0
lea eax, [esi + 0x50]
cmp eax, 0x5fac00
je 0x5804f9
push dword [eax + 4]
mov ecx, 0x5fac00
push dword [eax]
call fcn.00439460
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [esi + ecx + 0x58]
mov byte [ecx + 0x5fac08], al
inc ecx
cmp ecx, 0x20
jb 0x580500
mov al, byte [esi + 0x78]
xor ecx, ecx
mov byte [0x5fac28], al
mov al, byte [esi + 0x79]
mov byte [0x5fac29], al
mov al, byte [esi + 0x7a]
mov byte [0x5fac2a], al
mov al, byte [esi + 0x7b]
mov byte [0x5fac2b], al
mov al, byte [esi + 0x7c]
mov byte [0x5fac2c], al
mov al, byte [esi + 0x7d]
mov byte [0x5fac2d], al
mov al, byte [esi + 0x7e]
mov byte [0x5fac2e], al
mov al, byte [esi + 0x7f]
mov byte [0x5fac2f], al
mov al, byte [esi + ecx + 0x80]
mov byte [ecx + 0x5fac30], al
inc ecx
cmp ecx, 0x20
jb 0x580552
push 0x602dec
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0xb0]
and eax, 1
or eax, 0
je 0x5805a1
cmp byte [esi + 0xa8], 0
je 0x5805a1
mov eax, dword [esi + 0x78]
cmp eax, dword [esi + 0xa0]
jne 0x58059d
mov eax, dword [esi + 0x7c]
cmp eax, dword [esi + 0xa4]
je 0x5805a1
xor al, al
jmp 0x5805a3
mov al, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00587d99
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret