Function at 0x59d0f0
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0x40
mov edi, dword [ebp + 0x1c]
mov ebx, dword [ebp + 0x10]
mov dword [ebx], 0
xor eax, eax
cmp edi, 0x10
jb 0x59d36e
lea edx, [edi - 8]
cmp edx, dword [ebp + 0x14]
ja 0x59d36e
mov ecx, dword [ebp + 0x18]
mov esi, dword [ebp + 0xc]
cmp edi, 0x10
jne 0x59d166
mov dword [esp + 8], edx
xorps xmm0, xmm0
movaps xmmword [esp + 0x10], xmm0
lea eax, [esp + 0x10]
push dword [ebp + 8]
push eax
push ecx
call fcn.00599820
add esp, 0xc
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], eax
movq xmm0, qword [esp + 0x18]
movq qword [esi], xmm0
jmp 0x59d244
xor eax, eax
cmp edi, 0x18
jl 0x59d36e
mov dword [esp + 8], edx
mov edx, edi
and edx, 7
jne 0x59d36e
movq xmm0, qword [ecx]
movq qword [esp + 0x10], xmm0
add ecx, 8
push dword [esp + 8]
push ecx
push esi
call sub.api_ms_win_crt_private_l1_1_0.dll_memmove
add esp, 0xc
shr edi, 3
lea eax, [edi + edi*2]
lea ebx, [eax + eax]
add ebx, 0xfffffffa
mov eax, 1
mov dword [esp + 0x38], edi
sub eax, edi
mov dword [esp + 0x34], eax
mov eax, 5
lea edi, [esp + 0x10]
nop
mov dword [esp + 0xc], eax
mov dword [esp + 4], ebx
mov esi, dword [esp + 0x38]
nop dword [eax]
xor byte [esp + 0x17], bl
xor byte [esp + 0x16], bh
mov eax, ebx
shr eax, 0x10
xor byte [esp + 0x15], al
mov eax, ebx
shr eax, 0x18
xor byte [esp + 0x14], al
mov eax, dword [ebp + 0xc]
movsd xmm0, qword [eax + esi*8 - 0x10]
movsd qword [esp + 0x18], xmm0
push dword [ebp + 8]
push edi
push edi
call fcn.00599820
add esp, 0xc
movq xmm0, qword [esp + 0x18]
mov eax, dword [ebp + 0xc]
movq qword [eax + esi*8 - 0x10], xmm0
dec esi
dec ebx
cmp esi, 1
jne 0x59d1d0
mov eax, dword [esp + 0xc]
dec eax
mov ebx, dword [esp + 4]
add ebx, dword [esp + 0x34]
cmp eax, 6
jb 0x59d1c0
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x30], ecx
mov dword [esp + 0x2c], eax
mov ebx, dword [ebp + 0x10]
mov edi, dword [ebp + 0x1c]
lea eax, [esp + 0x2c]
push 4
push 0x8bf028
push eax
call sym.adb.exe_CRYPTO_memcmp
add esp, 0xc
mov dword [esp + 4], eax
mov edx, dword [esp + 0x30]
bswap edx
mov eax, edx
not eax
lea esi, [edx - 1]
and eax, esi
mov ecx, edi
add edi, 0xfffffff7
xor edi, esi
sar eax, 0x1f
xor esi, esi
cmp dword [esp + 4], 0
not eax
cmovne eax, esi
cmp edi, 8
mov edi, ecx
cmovae eax, esi
add ecx, 0xfffffff1
cmp ecx, dword [esp + 8]
jae 0x59d367
mov esi, ecx
xor esi, edx
mov ebx, ecx
sub ebx, edx
xor ebx, ecx
or ebx, esi
xor ebx, ecx
mov dword [esp + 4], ebx
lea ecx, [edi - 0xe]
mov esi, ecx
xor esi, edx
mov ebx, ecx
sub ebx, edx
xor ebx, ecx
or ebx, esi
xor ebx, ecx
lea esi, [edi - 0xd]
mov edi, esi
xor edi, edx
mov ecx, esi
sub ecx, edx
xor ecx, esi
or ecx, edi
xor ecx, esi
sar dword [esp + 4], 0x1f
mov dword [esp + 0xc], edx
mov edx, dword [esp + 4]
not dl
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 0x1c]
and dl, byte [edi + esi - 0xf]
mov dword [esp + 4], edx
mov edx, dword [esp + 0xc]
sar ebx, 0x1f
not bl
and bl, byte [edi + esi - 0xe]
sar ecx, 0x1f
not cl
and cl, byte [edi + esi - 0xd]
movd xmm0, esi
pshufd xmm0, xmm0, 0
paddd xmm0, xmmword [0x8be460]
movd esi, xmm0
movd xmm1, dword [edi + esi]
or cl, bl
mov ebx, dword [ebp + 0x10]
or cl, byte [esp + 4]
movd xmm2, edx
pshufd xmm2, xmm2, 0
movdqa xmm3, xmm0
pxor xmm3, xmm2
movdqa xmm4, xmm0
psubd xmm4, xmm2
pxor xmm4, xmm0
por xmm4, xmm3
pxor xmm4, xmm0
psrad xmm4, 0x1f
packssdw xmm4, xmm4
packsswb xmm4, xmm4
pandn xmm4, xmm1
mov esi, 0
cmovne eax, esi
movd ecx, xmm4
test ecx, ecx
cmovne eax, esi
and edx, eax
mov dword [ebx], edx
and eax, 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret