Function at 0x140049550
Capabilities:
Check if file exists
Create directory
Extract resource via kernel32 functions
Get common file path
Get file attributes
Write file on windows

Disassembly:
push rdi
push r14
push r15
mov eax, 0x2070
call fcn.140282780
sub rsp, rax
mov qword [rsp + 0x50], 0xfffffffffffffffe
mov qword [rsp + 0x2090], rbx
mov qword [rsp + 0x2098], rbp
mov qword [rsp + 0x20a0], rsi
mov rax, qword [0x1403b88b0]
xor rax, rsp
mov qword [rsp + 0x2060], rax
mov rax, qword [rcx + 0x10]
test rax, rax
jne 0x1400495bc
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x7fb
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x140049903
test dword [rax + 0xa8], 0x20000
jne 0x1400495e5
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x7fc
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x140049903
call fcn.1400f5f94
mov rcx, rax
test rax, rax
je 0x140049936
mov rax, qword [rax]
call qword [rax + 0x18]
add rax, 0x18
mov qword [rsp + 0x40], rax
lea rbx, [0x140328530]
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140014ab0
mov rdi, 0xffffffffffffffff
test al, al
jne 0x14004964b
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rbx + rax*2], 0
jne 0x140049630
mov r8d, eax
mov rdx, rbx
lea rcx, [rsp + 0x40]
call fcn.140010390
nop
lea rdx, [rsp + 0x60]
mov ecx, 0x1000
call qword [sym.imp.KERNEL32.dll_GetTempPathW]
lea rcx, [rsp + 0x60]
mov rax, rdi
lea rax, [rax + 1]
cmp word [rcx + rax*2], 0
jne 0x140049663
xor r15d, r15d
cmp word [rsp + rax*2 + 0x5e], 0x5c
jne 0x140049693
lea rax, [rax*2 - 2]
cmp rax, 0x2000
jae 0x140049930
mov word [rsp + rax + 0x60], r15w
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1400496b0
xor edx, edx
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateDirectoryW]
lea r8, [0x14032e8f0]
mov edx, 0x1000
lea rcx, [rsp + 0x60]
call fcn.14028b93c
xor r9d, r9d
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x1403dd120]
call fcn.140102880
mov ebx, eax
mov ebp, 1
test eax, eax
jne 0x14004970b
mov r9d, ebp
lea r8, str.ADRExtracted
lea rdx, str.General
lea rcx, [0x1403dd120]
call fcn.140102e14
mov esi, r15d
test ebx, ebx
sete sil
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
cmove esi, ebp
lea rcx, [rsp + 0x60]
mov rax, rdi
nop dword [rax]
inc rax
cmp word [rcx + rax*2], r15w
jne 0x140049730
mov r8d, eax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140010390
lea rdx, [0x14032e930]
mov rax, rdi
inc rax
cmp word [rdx + rax*2], r15w
jne 0x140049756
mov r8d, eax
lea rcx, [rsp + 0x40]
call fcn.14001bf50
mov edx, ebp
mov rbx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.14007f080
test esi, esi
je 0x1400498af
call fcn.140104be4
lea r8, str.Binary
mov edx, 0x143
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_FindResourceW]
mov rsi, rax
test rax, rax
jne 0x1400497c4
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x826
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x1400498ec
call fcn.140104be4
mov rdx, rsi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_SizeofResource]
mov ebp, eax
test eax, eax
jne 0x1400497f9
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x82a
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x1400498ec
call fcn.140104be4
mov rdx, rsi
mov rcx, qword [rax + 0x10]
call qword [sym.imp.KERNEL32.dll_LoadResource]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_LockResource]
mov r14, rax
test rax, rax
jne 0x140049839
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x82e
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x1400498ec
mov qword [rsp + 0x30], r15
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [r9 + 2]
lea rcx, [rsp + 0x60]
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rax, 0xffffffffffffffff
jne 0x140049888
lea r8, str.c:userschunyung_source_repos_rtkngui_rtknguicustomized.cpp
mov edx, 0x839
lea rcx, str._VCpl__RETURN_ON_FALSE:_Line___d__File___s_n
call fcn.140052e90
jmp 0x1400498ec
mov dword [rsp + 0x48], r15d
mov qword [rsp + 0x20], r15
lea r9, [rsp + 0x48]
mov r8d, ebp
mov rdx, r14
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
lea rcx, [rsp + 0x60]
mov rax, rdi
nop word [rax + rax]
inc rax
cmp word [rcx + rax*2], r15w
jne 0x1400498c0
mov r8d, eax
lea rdx, [rsp + 0x60]
lea rcx, [rsp + 0x40]
call fcn.140010390
xor edx, edx
mov rbx, qword [rsp + 0x40]
mov rcx, rbx
call fcn.14007f080
nop
lea rdx, [rbx - 0x18]
lock xadd dword [rdx + 0x10], edi
sub edi, 1
jg 0x140049903
mov rcx, qword [rdx]
mov rax, qword [rcx]
call qword [rax + reloc.OLEAUT32.dll_VariantClear]
mov rcx, qword [rsp + 0x2060]
xor rcx, rsp
call fcn.140281bf0
lea r11, [rsp + 0x2070]
mov rbx, qword [r11 + 0x20]
mov rbp, qword [r11 + 0x28]
mov rsi, qword [r11 + 0x30]
mov rsp, r11
pop r15
pop r14
pop rdi
ret
call fcn.140281ffc
nop
mov ecx, 0x80004005
call fcn.14000dc70
int3