Function at 0x5408f0
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 0x57143d
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ebx
sub esp, 0x278
push esi
mov esi, ecx
push edi
mov dword [ebp - 0x18], esi
cmp byte [esi + 0x38], 0
je 0x540d4e
push 0x5b4fc0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x5b2098], 0
jne 0x540a3a
mov eax, dword [esi + 0x3c]
cmp eax, dword [0x5b209c]
jne 0x540a3a
lea ecx, [esi + 0x40]
mov edx, 0x5b20a0
mov edi, 0xc
nop word [eax + eax]
mov eax, dword [ecx]
cmp eax, dword [edx]
jne 0x540a3a
add ecx, 4
add edx, 4
sub edi, 4
jae 0x540970
mov ecx, dword [esi + 0x54]
cmp ecx, dword [0x5b20b4]
jne 0x540a3a
test ecx, ecx
je 0x5409f3
mov edx, dword [esi + 0x50]
mov edi, dword [0x5b20b0]
sub ecx, 4
jb 0x5409b7
mov eax, dword [edx]
cmp eax, dword [edi]
jne 0x5409bc
add edx, 4
add edi, 4
sub ecx, 4
jae 0x5409a6
cmp ecx, 0xfffffffc
je 0x5409ed
mov al, byte [edx]
cmp al, byte [edi]
jne 0x5409e9
cmp ecx, 0xfffffffd
je 0x5409ed
mov al, byte [edx + 1]
cmp al, byte [edi + 1]
jne 0x5409e9
cmp ecx, 0xfffffffe
je 0x5409ed
mov al, byte [edx + 2]
cmp al, byte [edi + 2]
jne 0x5409e9
cmp ecx, 0xffffffff
je 0x5409ed
mov al, byte [edx + 3]
cmp al, byte [edi + 3]
je 0x5409ed
xor al, al
jmp 0x5409ef
mov al, 1
test al, al
je 0x540a3a
movups xmm0, xmmword [0x5b20b8]
movups xmmword [esi + 0x58], xmm0
movups xmm0, xmmword [0x5b20c8]
movups xmmword [esi + 0x68], xmm0
mov eax, dword [0x5b20d8]
mov ecx, dword [0x5b20dc]
mov dword [esi + 0x78], eax
mov dword [esi + 0x7c], ecx
movups xmm0, xmmword [0x5b20e0]
movups xmmword [esi + 0x80], xmm0
movups xmm0, xmmword [0x5b20f0]
movups xmmword [esi + 0x90], xmm0
mov byte [esi + 0x38], 0
push 0x5b4fc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp byte [esi + 0x38], 0
je 0x540d4e
push dword [esi + 0x54]
lea ecx, [ebp - 0x280]
push dword [esi + 0x50]
call fcn.0053fb50
mov ecx, 0x40
lea esi, [ebp - 0x280]
lea edi, [ebp - 0x180]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp - 0x18]
lea ecx, [ebp - 0x180]
push 0x10
lea edx, [esi + 0x40]
call fcn.00565430
push 4
lea edx, [ebp - 0x60]
mov dword [ebp - 0x60], 0x1000000
lea ecx, [ebp - 0x180]
call fcn.00565430
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x180]
call fcn.0053fb20
mov ecx, dword [esi + 0x3c]
mov edx, 1
movaps xmm0, xmmword [ebp - 0x60]
movaps xmm1, xmmword [ebp - 0x50]
shl edx, cl
dec edx
movaps xmmword [ebp - 0x80], xmm0
xor eax, eax
movaps xmmword [ebp - 0x70], xmm1
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x1c], eax
nop
mov ecx, eax
mov dword [ebp - 0x20], ecx
test edx, edx
je 0x540b51
nop dword [eax]
mov ecx, 0x40
lea esi, [ebp - 0x280]
lea edi, [ebp - 0x180]
rep movsd dword es:[edi], dword [esi]
push 0x20
lea edx, [ebp - 0x60]
lea ecx, [ebp - 0x180]
call fcn.00565430
lea eax, [ebp - 0x60]
push eax
lea ecx, [ebp - 0x180]
call fcn.0053fb20
xor eax, eax
nop dword [eax]
nop dword [eax + eax]
movups xmm0, xmmword [ebp + eax - 0x80]
movups xmm1, xmmword [ebp + eax - 0x60]
xorps xmm1, xmm0
movups xmmword [ebp + eax - 0x80], xmm1
add eax, 0x10
cmp eax, 0x20
jb 0x540b20
sub dword [ebp - 0x14], 1
jne 0x540ae0
movaps xmm1, xmmword [ebp - 0x70]
movaps xmm0, xmmword [ebp - 0x80]
mov eax, dword [ebp - 0x1c]
mov esi, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x20]
test eax, eax
jne 0x540b72
movups xmmword [esi + 0x58], xmm0
movups xmmword [esi + 0x68], xmm1
lea eax, [ecx + 1]
mov dword [ebp - 0x14], 0x10
mov dword [ebp - 0x1c], eax
mov dword [ebp - 0x20], eax
jmp 0x540ae0
cmp eax, 1
jne 0x540b87
movups xmmword [esi + 0x80], xmm0
movups xmmword [esi + 0x90], xmm1
jmp 0x540b5d
lea ecx, [ebp - 0x40]
inc eax
mov dword [ebp - 0x1c], eax
mov edx, 0x10
mov dword [ebp - 0x14], edx
movups xmmword [ecx], xmm0
movups xmmword [ecx + 0x10], xmm1
cmp eax, 3
jb 0x540ad0
mov eax, dword [ebp - 0x40]
mov ecx, 8
mov byte [esi + 0x78], al
mov byte [esi + 0x79], ah
movzx eax, byte [ebp - 0x3e]
mov byte [esi + 0x7a], al
lea edx, [ecx + 5]
movzx eax, byte [ebp - 0x3d]
lea edi, [ecx + 3]
mov byte [esi + 0x7b], al
movzx eax, byte [ebp - 0x3c]
mov byte [esi + 0x7c], al
movzx eax, byte [ebp - 0x3b]
mov byte [esi + 0x7d], al
movzx eax, byte [ebp - 0x3a]
mov byte [esi + 0x7e], al
movzx eax, byte [ebp - 0x39]
mov byte [esi + 0x7f], al
mov dword [ebp - 0x18], ecx
mov dword [ebp - 0x14], 9
nop
mov eax, dword [ebp - 0x14]
and ecx, 7
movzx eax, byte [ebp + eax - 0x41]
xor byte [ecx + esi + 0x78], al
mov ecx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x14]
and ecx, 7
movzx eax, byte [ebp + eax - 0x40]
xor byte [ecx + esi + 0x78], al
lea ecx, [edi - 1]
movzx eax, byte [ebp + edi - 0x41]
and ecx, 7
xor byte [ecx + esi + 0x78], al
mov ecx, edi
movzx eax, byte [ebp + edi - 0x40]
and ecx, 7
add edi, 6
xor byte [ecx + esi + 0x78], al
lea ecx, [edx - 1]
movzx eax, byte [ebp + edx - 0x41]
and ecx, 7
xor byte [ecx + esi + 0x78], al
mov ecx, edx
movzx eax, byte [ebp + edx - 0x40]
and ecx, 7
add edx, 6
xor byte [ecx + esi + 0x78], al
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 0x18]
add eax, 6
add ecx, 6
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x18], ecx
cmp eax, 0x21
jb 0x540bf0
push 0x5b4fc0
mov byte [esi + 0x38], 0
mov dword [ebp - 0x18], 0x5b4fc0
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov al, byte [esi + 0x38]
xor ecx, ecx
mov byte [0x5b2098], al
mov eax, dword [esi + 0x3c]
mov dword [ebp - 4], 0
mov dword [0x5b209c], eax
nop word [eax + eax]
mov al, byte [esi + ecx + 0x40]
mov byte [ecx + 0x5b20a0], al
inc ecx
cmp ecx, 0x10
jb 0x540ca0
lea eax, [esi + 0x50]
cmp eax, 0x5b20b0
je 0x540cc9
push dword [eax + 4]
mov ecx, 0x5b20b0
push dword [eax]
call fcn.0040c141
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [esi + ecx + 0x58]
mov byte [ecx + 0x5b20b8], al
inc ecx
cmp ecx, 0x20
jb 0x540cd0
movzx eax, byte [esi + 0x78]
xor ecx, ecx
mov byte [0x5b20d8], al
movzx eax, byte [esi + 0x79]
mov byte [0x5b20d9], al
movzx eax, byte [esi + 0x7a]
mov byte [0x5b20da], al
movzx eax, byte [esi + 0x7b]
mov byte [0x5b20db], al
movzx eax, byte [esi + 0x7c]
mov byte [0x5b20dc], al
movzx eax, byte [esi + 0x7d]
mov byte [0x5b20dd], al
movzx eax, byte [esi + 0x7e]
mov byte [0x5b20de], al
movzx eax, byte [esi + 0x7f]
mov byte [0x5b20df], al
nop word [eax + eax]
mov al, byte [esi + ecx + 0x80]
mov byte [ecx + 0x5b20e0], al
inc ecx
cmp ecx, 0x20
jb 0x540d30
push 0x5b4fc0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [esi + 0xb0]
and eax, 1
or eax, 0
je 0x540d90
cmp byte [esi + 0xa8], 0
je 0x540d90
mov eax, dword [esi + 0x78]
cmp eax, dword [esi + 0xa0]
jne 0x540d7b
mov eax, dword [esi + 0x7c]
cmp eax, dword [esi + 0xa4]
je 0x540d90
xor al, al
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret
mov ecx, dword [ebp - 0xc]
mov al, 1
pop edi
mov dword fs:[0], ecx
pop esi
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret