Function at 0x41af65
Capabilities:
Encode data using xor

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push ebx
mov ebx, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
push esi
push edi
mov edi, dword [ebp + 8]
mov esi, edx
mov dword [ebp - 0x10], edx
mov dword [ebp - 4], ecx
movzx eax, word [edi]
push eax
call ebx
pop ecx
test eax, eax
je 0x41af9b
add edi, 2
movzx eax, word [edi]
push eax
call ebx
pop ecx
test eax, eax
jne 0x41af8a
mov dword [ebp + 8], edi
movzx eax, word [esi]
push eax
call ebx
pop ecx
test eax, eax
je 0x41afb7
add esi, 2
movzx eax, word [esi]
push eax
call ebx
pop ecx
test eax, eax
jne 0x41afa6
mov dword [ebp - 0x10], esi
push esi
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
push edi
mov ebx, eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov edi, eax
pop ecx
pop ecx
test ebx, ebx
je 0x41aff2
lea esi, [esi + ebx*2]
add esi, 0xfffffffe
movzx ecx, word [esi]
push ecx
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
pop ecx
test eax, eax
je 0x41afef
sub esi, 2
sub ebx, 1
jne 0x41afd8
mov dword [ebp - 0xc], ebx
test edi, edi
je 0x41b016
mov esi, dword [ebp + 8]
add esi, 0xfffffffe
lea esi, [esi + edi*2]
movzx eax, word [esi]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_iswspace]
pop ecx
test eax, eax
je 0x41b016
sub esi, 2
sub edi, 1
jne 0x41afff
mov esi, dword [ebp - 4]
push dword [esi + 0x38]
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcslen]
mov dword [ebp - 8], eax
lea edx, [eax + edi]
mov eax, dword [esi + 0x18]
add eax, 9
add edx, ebx
lea eax, [eax + edx*2]
and eax, 0xfffffffc
add eax, 0xa8
push eax
mov dword [ebp - 0x14], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov ebx, eax
pop ecx
pop ecx
test ebx, ebx
je 0x41b1a9
push 0x30
push dword [ebp - 4]
lea esi, [ebx + 0xa8]
push ebx
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
mov eax, dword [ebp - 0x14]
mov dword [ebx], eax
mov eax, esi
sub eax, ebx
mov word [ebx + 0x38], ax
mov eax, dword [ebp - 8]
lea eax, [eax*2 + 2]
push eax
mov eax, dword [ebp - 4]
push dword [eax + 0x38]
push esi
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
mov eax, dword [ebp - 8]
inc eax
lea ecx, [esi + eax*2]
mov esi, dword [ebp - 0xc]
mov eax, ecx
mov dword [ebp - 0x14], ecx
sub eax, ebx
mov word [ebx + 0x3a], ax
lea eax, [esi + esi]
push eax
push dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
push ecx
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
mov edx, dword [ebp - 0x14]
mov eax, esi
and eax, 0x3f
add esp, 0x24
xor ecx, ecx
mov ax, word [eax*2 + 0x426b38]
mov word [edx + esi*2], ax
test esi, esi
je 0x41b0e1
mov eax, ecx
and eax, 0x3f
mov ax, word [eax*2 + 0x426b38]
xor word [edx + ecx*2], ax
inc ecx
cmp ecx, esi
jb 0x41b0cb
lea esi, [edx + 2]
add esi, dword [ebp - 0xc]
mov eax, esi
sub eax, ebx
mov word [ebx + 0x3c], ax
lea eax, [edi + edi]
push eax
push dword [ebp + 8]
push esi
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
mov eax, edi
lea edx, [edi + edi]
and eax, 0x3f
add esp, 0xc
mov ax, word [eax*2 + 0x426b38]
mov word [edx + esi], ax
test edi, edi
je 0x41b130
xor ecx, ecx
mov eax, ecx
and eax, 0x3f
mov ax, word [eax*2 + 0x426b38]
xor word [esi + ecx*2], ax
inc ecx
cmp ecx, edi
jb 0x41b11a
lea ecx, [esi + 2]
mov esi, dword [ebp - 4]
add ecx, edx
mov eax, ecx
sub eax, ebx
mov word [ebx + 0x3e], ax
push dword [esi + 0x18]
push dword [esi + 0x30]
push ecx
call dword [sym.imp.VCRUNTIME140.dll_memcpy]
xor eax, eax
mov word [ebx + 0x40], ax
push 0x5c
push dword [esi + 0x34]
mov esi, dword [sym.imp.VCRUNTIME140.dll_wcsrchr]
call esi
mov edi, eax
mov eax, dword [ebp - 4]
push 0x2f
push dword [eax + 0x34]
call esi
add esp, 0x1c
cmp edi, eax
cmova eax, edi
test eax, eax
jne 0x41b180
mov eax, dword [ebp - 4]
mov eax, dword [eax + 0x34]
jmp 0x41b183
add eax, 2
push 0x20
push eax
lea eax, [ebx + 0x68]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
add esp, 0xc
xor eax, eax
mov word [ebx + 0xa6], ax
call fcn.0041b281
push ebx
mov ecx, eax
call fcn.0041ae9f
pop edi
pop esi
pop ebx
leave
ret