Function at 0x1400471b0
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.luart_static.exe_lua_type
mov ecx, eax
mov edx, r15d
sub ecx, 3
je 0x140047541
sub ecx, 1
je 0x1400472fc
cmp ecx, 1
mov rcx, rdi
je 0x140047221
call sym.luart_static.exe_lua_objectname
mov r8, rax
lea rdx, str.cannot_create_Buffer_from__s
mov rcx, rdi
call sym.luart_static.exe_luaL_error
jmp 0x140047560
call sym.luart_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.luart_static.exe_lua_pushvalue
mov rcx, rdi
call sym.luart_static.exe_lua_pushnil
mov edx, 0xfffffffe
mov rcx, rdi
call sym.luart_static.exe_lua_next
test eax, eax
je 0x1400472ea
mov edx, 0xffffffff
mov rcx, rdi
call sym.luart_static.exe_lua_type
cmp eax, 3
je 0x140047294
mov edx, 0xffffffff
mov rcx, rdi
call sym.luart_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.luart_static.exe_luaL_error
xor r8d, r8d
mov rcx, rdi
lea edx, [r8 - 1]
call sym.luart_static.exe_lua_tointegerx
mov edx, 0xfffffffe
mov rcx, rdi
mov rbx, rax
call sym.luart_static.exe_lua_settop
cmp rbx, 0xff
jbe 0x1400472cb
lea rdx, str.invalid_value_in_table_in_Buffer:from__byte_overflow_
mov rcx, rdi
call sym.luart_static.exe_luaL_error
mov rax, qword [rbp + 0x10]
mov edx, 0xfffffffe
mov rcx, rdi
mov byte [rsi + rax], bl
inc rsi
call sym.luart_static.exe_lua_next
test eax, eax
jne 0x140047263
mov edx, 0xfffffffe
mov rcx, rdi
call sym.luart_static.exe_lua_settop
jmp 0x1400475ac
mov r8, r14
mov rcx, rdi
call sym.luart_static.exe_luaL_checklstring
mov rbx, rax
test r15d, r15d
jle 0x140047560
mov rcx, rdi
call sym.luart_static.exe_lua_gettop
cmp eax, 2
jle 0x140047560
lea edx, [r15 + 1]
mov rcx, rdi
lea r15, str.utf8
mov r9, r15
lea r8, str.utf8
call sym.luart_static.exe_luaL_checkoption
mov edx, eax
test eax, eax
je 0x140047560
sub edx, 1
je 0x140047522
sub edx, 1
je 0x140047468
cmp edx, 1
je 0x14004737d
movsxd r8, eax
lea rdx, str.unknown_encoding__s
mov rcx, rdi
mov r8, qword [r15 + r8*8]
call sym.luart_static.exe_luaL_error
jmp 0x140047560
test byte [r14], 1
mov qword [rsp + 0x80], r12
mov qword [rbp + 0x10], rbx
je 0x14004739e
lea rdx, str.invalid_hexadecimal_sequence_odd_number_of_characters_
mov rcx, rdi
call sym.luart_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 0x140047451
mov r15, rax
nop dword [rax]
mov rcx, qword [rbp + 0x10]
movzx ebx, byte [rsi + rcx]
lea ecx, [rbx - 0x30]
cmp cl, 9
jbe 0x1400473fc
lea eax, [rbx - 0x41]
cmp al, 5
ja 0x1400473dc
sub bl, 0x37
jmp 0x1400473fc
lea eax, [rbx - 0x61]
cmp al, 5
ja 0x1400473e8
sub bl, 0x57
jmp 0x1400473fc
mov r8d, ebx
lea rdx, str.invalid_character__c_in_hexadecimal_sequence
mov rcx, rdi
call sym.luart_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 0x140047436
lea eax, [rcx - 0x41]
cmp al, 5
ja 0x140047418
lea eax, [rcx - 0x37]
jmp 0x140047436
lea eax, [rcx - 0x61]
cmp al, 5
ja 0x140047424
lea eax, [rcx - 0x57]
jmp 0x140047436
mov r8d, ecx
lea rdx, str.invalid_character__c_in_hexadecimal_sequence
mov rcx, rdi
call sym.luart_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 0x1400473c0
shr rcx, 1
mov qword [rbp + 0x10], r12
mov r12, qword [rsp + 0x80]
mov qword [r14], rcx
jmp 0x1400475ac
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 0x1400475ac
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 0x1400475a3
mov eax, dword [rsp + 0x90]
mov qword [r14], rax
mov qword [rbp + 0x10], rbx
jmp 0x1400475ac
lea rdx, [rsp + 0x44]
mov rcx, rbx
mov esi, 1
call fcn.140040f70
mov rbx, rax
movsxd rax, dword [rsp + 0x44]
mov qword [r14], rax
jmp 0x140047560
mov rcx, rdi
call sym.luart_static.exe_luaL_checkinteger
mov qword [r14], rax
test rax, rax
jne 0x140047560
lea rdx, str.cannot_create_Buffer_with_zero_length
mov rcx, rdi
call sym.luart_static.exe_luaL_error
mov rdx, qword [r14]
test rdx, rdx
je 0x14004758b
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 0x14004758b
lea rdx, str.memory_allocation_error:_not_enough_memory
mov rcx, rdi
call sym.luart_static.exe_luaL_error
test rbx, rbx
je 0x1400475ac
mov r8, qword [r14]
mov rdx, rbx
mov rcx, qword [rbp + 0x10]
call sub.VCRUNTIME140.dll_memcpy
test esi, esi
je 0x1400475ac
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