Function at 0x5faf16
Capabilities:
Encode data using xor

Disassembly:
mov ebx, dword [reloc.MSVCRT.dll_strncpy]
sub ebx, 3
mov ecx, ebx
mov esi, dword [reloc.MSVCRT.dll_strncpy]
test esi, esi
jne 0x5faf36
mov dword [reloc.MSVCRT.dll_strncpy], 0xffffffff
inc esi
xor ebx, ebx
mov bx, word [esi + 0x5002a800]
mov dl, byte [esi + 0x5002a802]
xor bh, dl
xor bl, dl
mov edx, dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
mov dword [ebx*4 + reloc.MSVCRT.dll_strncpy], esi
mov dword [esi*4 + reloc.MSVCRT.dll_strncpy], edx
inc esi
cmp esi, ecx
jbe 0x5faf38
mov edx, dword [reloc.MSVCRT.dll_strncpy]
mov dword [reloc.MSVCRT.dll_strncpy], 2
mov ebx, dword [edx*4 + reloc.MSVCRT.dll_strncpy]
test ebx, ebx
js 0x5fb0ea
mov dword [reloc.MSVCRT.dll_strncpy], edx
sub dword [reloc.MSVCRT.dll_strncpy], 0x7ffe
mov eax, dword [reloc.MSVCRT.dll_strncpy]
mov dword [reloc.MSVCRT.dll_strncpy], eax
mov dword [reloc.MSVCRT.dll_strncpy], 2
mov al, byte [edx + 0x5002a802]
mov esi, dword [reloc.MSVCRT.dll_strncpy]
cmp byte [ebx + esi + 0x5002a800], al
jne 0x5fb019
cmp ebx, dword [reloc.MSVCRT.dll_strncpy]
jle 0x5fb038
mov ecx, 0x103
mov esi, edx
add esi, 0x5002a800
mov edi, ebx
add edi, 0x5002a800
cld
repe cmpsb byte [esi], byte es:[edi]
sub ecx, 0x102
neg ecx
cmp ecx, dword [reloc.MSVCRT.dll_strncpy]
jbe 0x5fb019
mov dword [reloc.MSVCRT.dll_strncpy], ecx
mov dword [reloc.MSVCRT.dll_strncpy], ebx
dec ecx
mov dword [reloc.MSVCRT.dll_strncpy], ecx
mov dword [reloc.MSVCRT.dll_strncpy], ebx
mov al, byte [edx + ecx + 0x5002a801]
mov ah, byte [edx + 0x5002a800]
mov ebx, edx
inc ebx
jmp 0x5fb177
dec dword [reloc.MSVCRT.dll_strncpy]
js 0x5fb038
mov ebx, dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
test ebx, ebx
js 0x5fb038
cmp ebx, dword [reloc.MSVCRT.dll_strncpy]
jge 0x5fafac
cmp dword [reloc.MSVCRT.dll_strncpy], 3
jb 0x5fb0ea
mov dword [reloc.MSVCRT.dll_strncpy], 2
mov ebx, dword [reloc.MSVCRT.dll_strncpy]
sub ebx, edx
cmp ebx, dword [reloc.MSVCRT.dll_strncpy]
jae 0x5fb06e
mov dword [reloc.MSVCRT.dll_strncpy], ebx
cmp dword [reloc.MSVCRT.dll_strncpy], 3
jb 0x5fb0ea
mov edi, edx
sub edi, dword [reloc.MSVCRT.dll_strncpy]
cmp dword [reloc.MSVCRT.dll_strncpy], 3
ja 0x5fb087
cmp edi, dword [reloc.MSVCRT.dll_strncpy]
ja 0x5fb0ea
mov esi, dword [reloc.MSVCRT.dll_strncpy]
mov ecx, dword [esi*4 + reloc.MSVCRT.dll_strncpy]
sub esi, dword [ecx*4 + reloc.MSVCRT.dll_strncpy]
add ecx, 0x100
shl esi, 0x10
or esi, ecx
inc dword [ecx*4 + reloc.MSVCRT.dll_strncpy]
mov ecx, dword [reloc.MSVCRT.dll_strncpy]
mov dword [ecx*4 + reloc.MSVCRT.dll_strncpy], esi
mov ebx, dword [edi*4 + reloc.MSVCRT.dll_strncpy]
sub edi, dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
shl edi, 0x10
or edi, ebx
inc dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
mov dword [ecx*4 + reloc.MSVCRT.dll_strncpy], edi
add dword [reloc.MSVCRT.dll_strncpy], 2
add edx, dword [reloc.MSVCRT.dll_strncpy]
jmp 0x5fb10d
xor ebx, ebx
mov bl, byte [edx + 0x5002a800]
inc dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
mov esi, dword [reloc.MSVCRT.dll_strncpy]
mov dword [esi*4 + reloc.MSVCRT.dll_strncpy], ebx
inc dword [reloc.MSVCRT.dll_strncpy]
inc edx
cmp edx, dword [reloc.MSVCRT.dll_strncpy]
jae 0x5fb291
cmp dword [reloc.MSVCRT.dll_strncpy], 0x8000
jb 0x5faf73
pushal
call fcn.005fad5e
call fcn.005fa36a
popal
jmp 0x5faf73
mov esi, dword [reloc.MSVCRT.dll_strncpy]
cmp byte [ebx + esi + 0x5002a800], al
je 0x5fb1ea
cmp esi, dword [reloc.MSVCRT.dll_strncpy]
jb 0x5fb177
cmp byte [ebx + 0x5002a7ff], ah
jne 0x5fb177
mov esi, dword [reloc.MSVCRT.dll_strncpy]
mov ecx, dword [edx + esi + reloc.MSVCRT.dll_strncpy]
cmp ecx, dword [ebx + esi + reloc.MSVCRT.dll_strncpy]
je 0x5fb24d
dec dword [reloc.MSVCRT.dll_strncpy]
js 0x5fb192
mov ebx, dword [ebx*4 + reloc.MSVCRT.dll_strncpy]
test ebx, ebx
js 0x5fb192
cmp ebx, dword [reloc.MSVCRT.dll_strncpy]
jge 0x5fb13a
cmp dword [reloc.MSVCRT.dll_strncpy], 0x103
jb 0x5fb1a4
dec dword [reloc.MSVCRT.dll_strncpy]
mov esi, dword [reloc.MSVCRT.dll_strncpy]
cmp dword [reloc.MSVCRT.dll_strncpy], esi
ja 0x5fb045
jb 0x5fb0ea
mov esi, dword [reloc.MSVCRT.dll_strncpy]
cmp esi, dword [reloc.MSVCRT.dll_strncpy]
jbe 0x5fb045
sub esi, edx
neg esi
mov edi, edx
sub edi, dword [reloc.MSVCRT.dll_strncpy]
shr edi, 2
cmp esi, edi
jae 0x5fb045
jmp 0x5fb0ea
mov ecx, 0x103
mov esi, edx
add esi, 0x5002a801
mov edi, ebx
add edi, 0x5002a800
cld
repe cmpsb byte [esi], byte es:[edi]
sub ecx, 0x102
neg ecx
cmp ecx, dword [reloc.MSVCRT.dll_strncpy]
jbe 0x5fb177
mov dword [reloc.MSVCRT.dll_strncpy], ecx
mov dword [reloc.MSVCRT.dll_strncpy], ebx
mov al, byte [edx + ecx + 0x5002a801]
cmp ah, byte [ebx + 0x5002a7ff]
jne 0x5fb177
inc ecx
mov dword [reloc.MSVCRT.dll_strncpy], ecx
mov dword [reloc.MSVCRT.dll_strncpy], ebx
dec dword [reloc.MSVCRT.dll_strncpy]
jmp 0x5fb177
mov ecx, 0x102
mov esi, edx
add esi, 0x5002a801
mov edi, ebx
add edi, 0x5002a800
cld
repe cmpsb byte [esi], byte es:[edi]
sub ecx, 0x101
neg ecx
inc ecx
cmp ecx, dword [reloc.MSVCRT.dll_strncpy]
jbe 0x5fb177
mov dword [reloc.MSVCRT.dll_strncpy], ecx
mov dword [reloc.MSVCRT.dll_strncpy], ebx
dec dword [reloc.MSVCRT.dll_strncpy]
jmp 0x5fb177
ret