Function at 0x5370ab
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x60
mov eax, dword [0x5ff014]
xor eax, ebp
mov dword [esp + 0x58], eax
mov eax, dword [0x5ffd2c]
test al, 1
jne 0x537664
mov ecx, eax
or ecx, 1
lock cmpxchg dword [0x5ffd2c], ecx
test al, 1
jne 0x537664
mov eax, dword [0x5ffd1c]
mov dword [esp + 0x18], eax
mov eax, dword [0x5ffd18]
mov dword [esp + 0x1c], eax
movq xmm0, qword [0x5ffd20]
movd esi, xmm0
pshufd xmm0, xmm0, 0x55
movd dword [esp], xmm0
mov dword [esp + 4], 0
call fcn.00436210
mov ebx, eax
mov edi, edx
xor eax, eax
push eax
push eax
lea eax, [esp + 0x58]
push eax
call fcn.0053b540
add esp, 0xc
lea eax, [esp + 0x48]
push eax
call fcn.0053b4f0
add esp, 4
mov eax, dword [esp + 0x50]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x48]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x14], eax
call fcn.00436210
mov dword [esp + 0x28], eax
sub eax, ebx
mov dword [esp + 0x2c], edx
mov ecx, edx
sbb ecx, edi
cmp eax, esi
mov edx, ecx
sbb edx, dword [esp]
jae 0x5371a1
mov edi, dword [esp + 0x1c]
sub edi, dword [esp + 0x28]
mov edx, dword [esp + 0x18]
sbb edx, dword [esp + 0x2c]
cmp eax, esi
mov ebx, ecx
sbb ebx, dword [esp]
jae 0x537114
cmp edi, 0x10000
sbb edx, 0
jb 0x537114
jmp 0x537202
mov edx, dword [esp + 4]
inc edx
cmp edx, 0x14
je 0x5371b1
mov dword [esp + 4], edx
jmp 0x537177
mov edx, dword [esp]
mov edi, esi
mov esi, edx
shld esi, edi, 1
lea ebx, [edi + edi]
add ebx, 2
mov dword [esp + 4], ebx
adc esi, 0
cmp edi, 0xf4240
mov ebx, edx
sbb ebx, 0
cmovb edx, esi
mov esi, edi
cmovb esi, dword [esp + 4]
mov dword [esp], edx
movd xmm0, edx
movd xmm1, esi
punpckldq xmm1, xmm0
movq qword [0x5ffd20], xmm1
mov dword [esp + 4], 0
jmp 0x537177
mov edi, dword [esp]
mov edx, edi
shld edx, esi, 0x1f
shr edi, 1
cmp edx, eax
sbb edi, ecx
mov edx, dword [esp + 0x14]
jae 0x5372f8
mov dword [0x5ffd28], 0
mov eax, dword [esp + 0x10]
sub eax, dword [esp + 0xc]
sbb edx, dword [esp + 8]
mov dword [esp + 0x14], edx
mov ecx, 0x3e8
mul ecx
mov dword [esp + 4], eax
mov ecx, dword [esp + 0x28]
mov dword [0x5ffd18], ecx
mov ebx, dword [esp + 0x2c]
mov dword [0x5ffd1c], ebx
movq xmm0, qword [0x5ffcd0]
movq xmm1, qword [0x5ffcd8]
pshufd xmm2, xmm1, 0x55
movd esi, xmm2
movd edi, xmm1
movq xmm1, qword [0x5ffce0]
movq xmm2, qword [0x5ffce8]
mov eax, ecx
mov dword [esp + 8], edi
sub eax, edi
mov dword [esp + 0xc], esi
sbb ebx, esi
movd ecx, xmm2
cmp eax, ecx
pshufd xmm2, xmm2, 0x55
movd edi, xmm2
mov ecx, ebx
sbb ecx, edi
pshufd xmm3, xmm0, 0x55
pshufd xmm4, xmm1, 0x55
movq xmm2, qword [0x5ffcc8]
movd edi, xmm0
movd dword [esp + 0x30], xmm3
movd ecx, xmm1
movd esi, xmm4
jae 0x537337
imul esi, eax
mul ecx
add esi, edx
imul ebx, ecx
add ebx, esi
mov edx, edi
mov edi, ebx
shld ebx, eax, 2
shr edi, 0x1e
add ebx, edx
adc edi, dword [esp + 0x30]
add dword [0x5ffd10], 1
adc dword [0x5ffd14], 0
jmp 0x53762a
xor eax, eax
inc eax
lock xadd dword [0x5ffd28], eax
cmp eax, 3
jb 0x537225
mov edi, dword [esp]
mov eax, edi
shld eax, esi, 0x1d
mov ecx, edi
shr ecx, 3
sub esi, eax
sbb edi, ecx
movd xmm0, esi
movd xmm1, edi
punpckldq xmm0, xmm1
movq qword [0x5ffd20], xmm0
jmp 0x53721b
mov dword [esp + 0x10], ecx
mov dword [esp], esi
mov dword [esp + 0x44], edi
mov dword [esp + 0x18], eax
mov dword [esp + 0x1c], ebx
imul ecx, dword [esp + 0x14], 0x3e8
add edx, ecx
mov dword [esp + 0x24], edx
mov eax, dword [esp + 4]
mov dword [esp + 0x38], eax
movd esi, xmm2
pshufd xmm0, xmm2, 0x55
movd dword [esp + 0x40], xmm0
mov edx, dword [0x5ffcc4]
mov eax, dword [0x5ffcc0]
mov ebx, eax
add ebx, 1
mov ecx, edx
adc ecx, 0
lock cmpxchg8b qword [0x5ffcc0]
jne 0x53737a
mov dword [esp + 0x34], edx
mov dword [esp + 0x3c], eax
mov ecx, esi
add ecx, 0x2a05f200
mov ebx, dword [esp + 0x40]
mov eax, ebx
adc eax, 1
mov dword [esp + 0x20], esi
mov edx, esi
or edx, ebx
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 4]
mov esi, dword [esp + 8]
je 0x5375ae
cmp ecx, edx
sbb eax, edi
jb 0x5375ae
cmp edx, dword [esp + 0x20]
mov eax, edi
sbb eax, ebx
jb 0x5375ae
cmp dword [esp + 0x28], esi
mov eax, dword [esp + 0x2c]
sbb eax, dword [esp + 0xc]
jb 0x5375ae
mov eax, dword [esp + 0x20]
add eax, 0x1dcd6500
mov ecx, ebx
adc ecx, 0
add esi, 0x32
mov dword [esp + 8], esi
mov esi, dword [esp + 0xc]
adc esi, 0
cmp eax, edx
sbb ecx, edi
jae 0x537654
mov eax, dword [esp + 8]
cmp eax, dword [esp + 0x28]
sbb esi, dword [esp + 0x2c]
jae 0x537654
mov eax, dword [esp + 0x10]
or eax, dword [esp]
mov eax, dword [esp + 0x38]
mov dword [esp + 0xc], eax
mov ecx, edi
mov eax, dword [esp + 0x20]
je 0x5374d4
xor ecx, ecx
mov ebx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
shrd ebx, esi, cl
shr esi, cl
test cl, 0x20
cmovne ebx, esi
mov eax, 0
cmovne esi, eax
mov eax, esi
mul dword [esp + 0x10]
mov dword [esp + 0xc], eax
seto byte [esp + 0x14]
mov eax, dword [esp]
mul ebx
mov edi, eax
seto byte [esp + 8]
add edi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
mul ebx
add edi, edx
setb dh
test esi, esi
setne dl
cmp dword [esp], 0
setne bl
and bl, dl
or bl, byte [esp + 8]
or bl, byte [esp + 0x14]
or bl, dh
inc ecx
test bl, bl
jne 0x537440
mov dl, 0x1f
sub dl, cl
mov ecx, edx
shrd eax, edi, cl
shr edi, cl
xor ecx, ecx
test dl, 0x20
cmovne eax, edi
cmove ecx, edi
add eax, dword [esp + 0x44]
mov dword [esp + 0xc], eax
adc ecx, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov edx, dword [esp + 4]
mov eax, dword [esp + 0x20]
mov ebx, dword [esp + 0x40]
mov dword [esp + 0x30], ecx
sub edx, eax
mov dword [esp + 0x14], edx
sbb edi, ebx
mov dword [esp + 0x10], edi
xor ecx, ecx
mov dword [esp], ecx
mov eax, dword [esp]
mov ecx, eax
add cl, 0x1e
mov esi, dword [esp + 0x10]
mov eax, dword [esp + 0x14]
shld esi, eax, cl
shl eax, cl
test cl, 0x20
cmovne esi, eax
mov edx, esi
shr edx, cl
test cl, 0x20
mov ebx, 0
cmovne eax, ebx
mov edi, edx
cmovne edi, ebx
mov ebx, eax
shrd ebx, esi, cl
test cl, 0x20
mov ecx, dword [esp]
cmovne ebx, edx
xor ebx, dword [esp + 0x14]
xor edi, dword [esp + 0x10]
dec ecx
or edi, ebx
jne 0x5374e6
not cl
mov edx, dword [esp + 0x1c]
mov ebx, dword [esp + 0x18]
shrd ebx, edx, cl
shr edx, cl
xor edi, edi
test cl, 0x20
cmovne ebx, edx
cmovne edx, edi
mov ecx, ebx
or ecx, edx
je 0x537680
mov dword [esp + 8], 0
cmp eax, ebx
mov ecx, esi
sbb ecx, edx
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 4]
mov dword [esp + 0x18], ebx
mov ebx, dword [esp + 0xc]
jb 0x53769c
push edx
push dword [esp + 0x1c]
push esi
push eax
call fcn.005286a0
push edx
push eax
push 0x1f400000
push 0
call fcn.005286a0
mov dword [esp + 8], eax
mov dword [esp + 0x1c], edx
mov ecx, dword [esp + 4]
jmp 0x53769c
movd xmm0, edx
movd xmm1, edi
punpckldq xmm0, xmm1
movq qword [0x5ffcc8], xmm0
movq qword [0x5ffcd0], xmm0
movd xmm0, dword [esp + 0x28]
movd xmm1, dword [esp + 0x2c]
punpckldq xmm0, xmm1
movq qword [0x5ffcd8], xmm0
pxor xmm0, xmm0
movq qword [0x5ffce0], xmm0
movq qword [0x5ffce8], xmm0
add dword [0x5ffcf0], 1
adc dword [0x5ffcf4], 0
mov ebx, dword [esp + 0x38]
mov eax, dword [esp + 0x3c]
mov ecx, dword [esp + 0x34]
add eax, 2
adc ecx, 0
movd xmm0, ecx
movd xmm1, eax
punpckldq xmm1, xmm0
movq qword [0x5ffcc0], xmm1
mov eax, dword [0x5ffd2c]
and eax, 2
xchg dword [0x5ffd2c], eax
cmp eax, 8
jae 0x537673
mov ecx, dword [esp + 0x58]
xor ecx, ebp
call fcn.00504596
mov eax, ebx
mov edx, edi
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
add dword [0x5ffd08], 1
adc dword [0x5ffd0c], 0
jmp 0x537604
mov ecx, 0x5ffd2c
call fcn.00535adc
jmp 0x5370e4
mov ecx, 0x5ffd2c
push eax
call fcn.00535c28
jmp 0x53763d
mov dword [esp + 8], 0
mov dword [esp + 0x1c], 0
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 4]
mov ebx, dword [esp + 0xc]
mov edx, ecx
sub edx, ebx
sbb edi, dword [esp + 0x30]
mov eax, edi
sar eax, 0x1f
shr eax, 0x1c
add eax, edx
mov ecx, edi
adc ecx, 0
shrd eax, ecx, 4
sar ecx, 4
mov dword [esp + 0x20], edx
sub edx, eax
mov dword [esp + 0x18], edi
sbb edi, ecx
add edx, 0x7d000000
mov dword [esp + 0x14], edx
adc edi, 0
mov dword [esp + 0x10], edi
xor ecx, ecx
mov dword [esp], ecx
mov eax, dword [esp]
mov ecx, eax
add cl, 0x1e
mov esi, dword [esp + 0x10]
mov edi, dword [esp + 0x14]
shld esi, edi, cl
shl edi, cl
test cl, 0x20
cmovne esi, edi
mov eax, esi
shr eax, cl
test cl, 0x20
mov ebx, 0
cmovne edi, ebx
mov edx, eax
cmovne edx, ebx
mov ebx, edi
shrd ebx, esi, cl
test cl, 0x20
mov ecx, dword [esp]
cmovne ebx, eax
xor ebx, dword [esp + 0x14]
xor edx, dword [esp + 0x10]
dec ecx
or edx, ebx
jne 0x5376d9
not cl
mov edx, dword [esp + 8]
mov eax, dword [esp + 0x1c]
shrd edx, eax, cl
shr eax, cl
xor ebx, ebx
test cl, 0x20
cmovne edx, eax
cmove ebx, eax
mov eax, edx
or eax, ebx
je 0x5377d9
push ebx
push edx
push esi
push edi
mov dword [esp + 0x18], edx
call fcn.005286a0
cmp edi, dword [esp + 8]
sbb esi, ebx
jb 0x5377d9
xor ecx, ecx
mov esi, 0x5f5e0ff
cmp esi, dword [esp + 0x20]
sbb ecx, dword [esp + 0x18]
jl 0x5377d9
cmp dword [esp + 0x20], 0xfa0a1f01
sbb dword [esp + 0x18], 0xffffffff
jl 0x5377d9
movd xmm0, eax
movd xmm1, edx
punpckldq xmm0, xmm1
movq qword [0x5ffce0], xmm0
push edx
push eax
push 0x1f400000
push 0
call fcn.005286a0
movd xmm0, edx
movd xmm1, eax
punpckldq xmm1, xmm0
movq qword [0x5ffce8], xmm1
add dword [0x5ffd00], 1
adc dword [0x5ffd04], 0
mov ebx, dword [esp + 0xc]
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 4]
mov edi, dword [esp + 0x30]
jmp 0x53780d
pxor xmm0, xmm0
movq qword [0x5ffce0], xmm0
movq qword [0x5ffce8], xmm0
add dword [0x5ffcf8], 1
adc dword [0x5ffcfc], 0
mov eax, dword [esp + 0x24]
mov edi, eax
mov ebx, dword [esp + 0x38]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 4]
movd xmm0, edx
movd xmm1, eax
movd xmm2, dword [esp + 0x28]
movd xmm3, dword [esp + 0x2c]
punpckldq xmm0, xmm1
movq qword [0x5ffcc8], xmm0
movd xmm0, ebx
movd xmm1, edi
punpckldq xmm0, xmm1
movq qword [0x5ffcd0], xmm0
punpckldq xmm2, xmm3
movq qword [0x5ffcd8], xmm2
mov eax, dword [esp + 0x3c]
jmp 0x537610