Function at 0x1400471a0
Capabilities:
Decode data using base64 via winapi

Disassembly:
mov qword [rsp + 0x10], rbx
push rbp
push rsi
push rdi
push r14
push r15
sub rsp, 0x50
mov rdi, rcx
xor esi, esi
mov rcx, qword [r8 + 0x10]
mov ebx, esi
mov rbp, r8
mov r15d, edx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov edx, r15d
lea r14, [rbp + 8]
mov rcx, rdi
call sym.wluart_static.exe_lua_type
mov ecx, eax
mov edx, r15d
sub ecx, 3
je 0x140047531
sub ecx, 1
je 0x1400472ec
cmp ecx, 1
mov rcx, rdi
je 0x140047211
call sym.wluart_static.exe_lua_objectname
mov r8, rax
lea rdx, str.cannot_create_Buffer_from__s
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
jmp 0x140047550
call sym.wluart_static.exe_luaL_len
mov rdx, rax
mov qword [r14], rax
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov edx, r15d
mov rcx, rdi
mov qword [rbp + 0x10], rax
call sym.wluart_static.exe_lua_pushvalue
mov rcx, rdi
call sym.wluart_static.exe_lua_pushnil
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_next
test eax, eax
je 0x1400472da
mov edx, 0xffffffff
mov rcx, rdi
call sym.wluart_static.exe_lua_type
cmp eax, 3
je 0x140047284
mov edx, 0xffffffff
mov rcx, rdi
call sym.wluart_static.exe_lua_objectname
mov r8, rax
lea rdx, str.invalid_value_in_table_in_Buffer:from__number_expected_found__s_
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 - 1]
call sym.wluart_static.exe_lua_tointegerx
mov edx, 0xfffffffe
mov rcx, rdi
mov rbx, rax
call sym.wluart_static.exe_lua_settop
cmp rbx, 0xff
jbe 0x1400472bb
lea rdx, str.invalid_value_in_table_in_Buffer:from__byte_overflow_
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
mov rax, qword [rbp + 0x10]
mov edx, 0xfffffffe
mov rcx, rdi
mov byte [rsi + rax], bl
inc rsi
call sym.wluart_static.exe_lua_next
test eax, eax
jne 0x140047253
mov edx, 0xfffffffe
mov rcx, rdi
call sym.wluart_static.exe_lua_settop
jmp 0x14004759c
mov r8, r14
mov rcx, rdi
call sym.wluart_static.exe_luaL_checklstring
mov rbx, rax
test r15d, r15d
jle 0x140047550
mov rcx, rdi
call sym.wluart_static.exe_lua_gettop
cmp eax, 2
jle 0x140047550
lea edx, [r15 + 1]
mov rcx, rdi
lea r15, str.utf8
mov r9, r15
lea r8, str.utf8
call sym.wluart_static.exe_luaL_checkoption
mov edx, eax
test eax, eax
je 0x140047550
sub edx, 1
je 0x140047512
sub edx, 1
je 0x140047458
cmp edx, 1
je 0x14004736d
movsxd r8, eax
lea rdx, str.unknown_encoding__s
mov rcx, rdi
mov r8, qword [r15 + r8*8]
call sym.wluart_static.exe_luaL_error
jmp 0x140047550
test byte [r14], 1
mov qword [rsp + 0x80], r12
mov qword [rbp + 0x10], rbx
je 0x14004738e
lea rdx, str.invalid_hexadecimal_sequence_odd_number_of_characters_
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
mov rcx, qword [r14]
shr rcx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov rcx, qword [r14]
mov r12, rax
test rcx, rcx
je 0x140047441
mov r15, rax
nop dword [rax]
mov rcx, qword [rbp + 0x10]
movzx ebx, byte [rsi + rcx]
lea ecx, [rbx - 0x30]
cmp cl, 9
jbe 0x1400473ec
lea eax, [rbx - 0x41]
cmp al, 5
ja 0x1400473cc
sub bl, 0x37
jmp 0x1400473ec
lea eax, [rbx - 0x61]
cmp al, 5
ja 0x1400473d8
sub bl, 0x57
jmp 0x1400473ec
mov r8d, ebx
lea rdx, str.invalid_character__c_in_hexadecimal_sequence
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
mov ebx, eax
mov rax, qword [rbp + 0x10]
movzx ecx, byte [rsi + rax + 1]
lea eax, [rcx - 0x30]
cmp al, 9
jbe 0x140047426
lea eax, [rcx - 0x41]
cmp al, 5
ja 0x140047408
lea eax, [rcx - 0x37]
jmp 0x140047426
lea eax, [rcx - 0x61]
cmp al, 5
ja 0x140047414
lea eax, [rcx - 0x57]
jmp 0x140047426
mov r8d, ecx
lea rdx, str.invalid_character__c_in_hexadecimal_sequence
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
shl bl, 4
add rsi, 2
add bl, al
mov byte [r15], bl
inc r15
mov rcx, qword [r14]
cmp rsi, rcx
jb 0x1400473b0
shr rcx, 1
mov qword [rbp + 0x10], r12
mov r12, qword [rsp + 0x80]
mov qword [r14], rcx
jmp 0x14004759c
mov edx, dword [r14]
lea rax, [rsp + 0x98]
mov qword [rsp + 0x30], rax
xor r9d, r9d
lea rax, [rsp + 0x40]
mov qword [rbp + 0x10], rbx
mov qword [rsp + 0x28], rax
mov rcx, rbx
lea rax, [rsp + 0x90]
mov dword [rsp + 0x90], esi
lea r8d, [r9 + 1]
mov qword [rsp + 0x20], rax
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x98], esi
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
je 0x14004759c
mov ecx, dword [rsp + 0x90]
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, dword [r14]
mov r8d, 1
mov rcx, qword [rbp + 0x10]
mov rbx, rax
lea rax, [rsp + 0x98]
mov r9, rbx
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x40]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x90]
mov qword [rsp + 0x20], rax
call qword [sym.imp.CRYPT32.dll_CryptStringToBinaryA]
test eax, eax
je 0x140047593
mov eax, dword [rsp + 0x90]
mov qword [r14], rax
mov qword [rbp + 0x10], rbx
jmp 0x14004759c
lea rdx, [rsp + 0x44]
mov rcx, rbx
mov esi, 1
call fcn.140040f60
mov rbx, rax
movsxd rax, dword [rsp + 0x44]
mov qword [r14], rax
jmp 0x140047550
mov rcx, rdi
call sym.wluart_static.exe_luaL_checkinteger
mov qword [r14], rax
test rax, rax
jne 0x140047550
lea rdx, str.cannot_create_Buffer_with_zero_length
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
mov rdx, qword [r14]
test rdx, rdx
je 0x14004757b
mov ecx, 1
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_calloc]
mov qword [rbp + 0x10], rax
test rax, rax
jne 0x14004757b
lea rdx, str.memory_allocation_error:_not_enough_memory
mov rcx, rdi
call sym.wluart_static.exe_luaL_error
test rbx, rbx
je 0x14004759c
mov r8, qword [r14]
mov rdx, rbx
mov rcx, qword [rbp + 0x10]
call sub.VCRUNTIME140.dll_memcpy
test esi, esi
je 0x14004759c
mov rcx, rbx
call qword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
mov rbx, qword [rsp + 0x88]
add rsp, 0x50
pop r15
pop r14
pop rdi
pop rsi
pop rbp
ret