Function at 0x403fb5
Capabilities:
Encode data using xor

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x58
mov ebp, ecx
mov r13, rdx
mov ecx, 0x208
call fcn.004acb70
mov r14, rax
mov word [rax], 0
mov word [rax + 2], 0
lea rax, [rax + 4]
lea rdx, [r14 + 0x208]
mov word [rax], 0
add rax, 2
cmp rax, rdx
jne 0x403fed
mov ecx, 0x618
call fcn.004acb70
mov r15, rax
mov word [rax], 0
mov word [rax + 2], 0
lea rax, [rax + 4]
lea rdx, [r15 + 0x618]
mov word [rax], 0
add rax, 2
cmp rax, rdx
jne 0x40401e
cmp ebp, 1
jle 0x40418b
mov ebx, 1
lea rax, [rsp + 0x3c]
mov qword [rsp + 0x28], rax
jmp 0x4040cc
mov word [rsp + 0x46], 0x1e
mov word [rsp + 0x48], 0x50
mov word [rsp + 0x4a], 0x5a
mov word [rsp + 0x4c], 0x50
mov word [rsp + 0x4e], 0x37
lea r8, [rsp + 0x46]
mov ecx, 0
mov r9d, 0x4bda12f7
mov eax, ecx
imul r9d
sar edx, 4
mov eax, ecx
sar eax, 0x1f
sub edx, eax
imul edx, edx, 0x36
mov eax, ecx
sub eax, edx
add eax, 0x33
xor word [r8], ax
add ecx, 1
add r8, 2
cmp ecx, 5
jne 0x40407c
lea rdx, [rsp + 0x46]
mov rcx, qword [rdi]
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x4040c1
lea edi, [rbx + 1]
cmp edi, ebp
jl 0x404171
add ebx, 1
cmp ebp, ebx
jle 0x40418b
mov word [rsp + 0x3c], 0x1e
mov word [rsp + 0x3e], 0x50
mov word [rsp + 0x40], 0x5a
mov word [rsp + 0x42], 0x46
mov word [rsp + 0x44], 0x37
lea r8, [rsp + 0x3c]
mov ecx, 0
mov r9d, 0x4bda12f7
mov eax, ecx
imul r9d
sar edx, 4
mov eax, ecx
sar eax, 0x1f
sub edx, eax
imul edx, edx, 0x36
mov eax, ecx
sub eax, edx
add eax, 0x33
xor word [r8], ax
add ecx, 1
add r8, 2
cmp ecx, 5
jne 0x4040ff
movsxd rsi, ebx
shl rsi, 3
lea rdi, [r13 + rsi]
mov rdx, qword [rsp + 0x28]
mov rcx, qword [rdi]
call sub.msvcrt.dll_wcscmp
test eax, eax
jne 0x404049
lea r12d, [rbx + 1]
cmp r12d, ebp
jge 0x404049
mov r8, qword [r13 + rsi + 8]
mov edx, 0x103
mov rcx, r14
call qword [sym.imp.msvcrt.dll_wcscpy_s]
mov ebx, r12d
jmp 0x4040c1
mov r8, qword [r13 + rsi + 8]
mov edx, 0x30b
mov rcx, r15
call qword [sym.imp.msvcrt.dll_wcscpy_s]
mov ebx, edi
jmp 0x4040c1
mov rcx, r14
call sub.msvcrt.dll_wcslen
mov ebx, 0
cmp rax, 1
ja 0x404216
mov rcx, r15
call sub.msvcrt.dll_wcslen
cmp rax, 2
jbe 0x4041f3
mov ebx, 4
mov rdi, qword [0x005bb190]
mov rsi, rdi
mov rcx, r15
call qword [rdi + 0x198]
cmp eax, 0xffffffff
je 0x4042a9
test al, 0x10
jne 0x4042b3
mov rcx, r15
call qword [rsi + 0x1a0]
mov ecx, 0x64
call qword [rsi + 0x218]
sub ebx, 1
jne 0x4041bb
mov ebx, 1
mov rcx, r14
call fcn.004acb40
mov rcx, r15
call fcn.004acb40
mov eax, ebx
add rsp, 0x58
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov rcx, r14
call qword [sym.imp.msvcrt.dll__wtoi]
mov r12d, eax
mov esi, 3
mov rbp, qword [0x005bb190]
mov r13, rbp
mov rdi, rbp
mov r8d, r12d
mov edx, 0
mov ecx, 1
call qword [rbp + 0xe0]
mov rbx, rax
test rax, rax
je 0x40427b
mov edx, 0
mov rcx, rax
call qword [r13 + 0xf0]
test eax, eax
jne 0x404297
mov rcx, rbx
call qword [rdi + 0xc0]
mov ecx, 0x64
call qword [rdi + 0x218]
sub esi, 1
jne 0x404234
mov ecx, 0x64
mov rax, qword [0x005bb190]
call qword [rax + 0x218]
mov ebx, 1
jmp 0x40419e
mov rcx, rbx
mov rax, qword [0x005bb190]
call qword [rax + 0xc0]
jmp 0x40427b
mov ebx, 1
jmp 0x4041f3
mov ebx, 1
jmp 0x4041f3