Function at 0x18001a3a0
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
push r12
push r13
push r14
push r15
sub rsp, 0x8d0
mov rax, qword [0x180185680]
xor rax, rsp
mov qword [rsp + 0x8c0], rax
mov r15d, r9d
mov edi, r8d
mov rbx, rdx
mov rsi, rcx
mov qword [rsp + 0x50], rcx
xor r14d, r14d
mov r12d, r14d
mov qword [rsp + 0x58], r14
call sym.SafeBase64.dll_LngGetFileAttributes
mov ecx, 0x80
cmp eax, 0xffffffff
cmove eax, ecx
mov dword [rsp + 0x48], eax
mov qword [rsp + 0x30], r14
mov dword [rsp + 0x28], ecx
mov dword [rsp + 0x20], 3
xor r9d, r9d
mov edx, 0x80000000
lea r8d, [r14 + 1]
mov rcx, rsi
call sym.SafeBase64.dll_LngCreateFile
mov r13, rax
mov qword [rsp + 0x60], rax
cmp rax, 0xffffffffffffffff
jne 0x18001a44d
xor eax, eax
mov rcx, qword [rsp + 0x8c0]
xor rcx, rsp
call fcn.18010faf0
add rsp, 0x8d0
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbx
ret
lea rdx, [rsp + 0x90]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_GetFileSizeEx]
mov r14d, eax
mov dword [rsp + 0x40], eax
test eax, eax
je 0x18001a82d
cmp qword [rsp + 0x90], 0x400
jl 0x18001a82d
xor eax, eax
mov r14d, eax
mov dword [rsp + 0x40], eax
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x88]
mov r8d, 0x400
lea rdx, [rsp + 0xa0]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18001a82d
mov edx, 2
lea rcx, [rsp + 0xa0]
call sym.SafeBase64.dll_Ordinal_38
test eax, eax
jne 0x18001a4da
mov r14d, 1
mov dword [rsp + 0x40], r14d
jmp 0x18001a82d
cmp dword [rsp + 0x164], r14d
jne 0x18001a82d
movzx eax, word [rsp + 0x168]
mov dword [rsp + 0x20], eax
mov r9d, edi
mov r8, rbx
mov edx, 0x20
lea rcx, [rsp + 0x140]
call sym.SafeBase64.dll_Ordinal_24
mov edx, 0x3fc
lea rcx, [rsp + 0xa0]
call sym.SafeBase64.dll_Ordinal_34
cmp dword [rsp + 0x49c], eax
jne 0x18001a82d
mov edx, 0x20
lea rcx, [rsp + 0x140]
call sym.SafeBase64.dll_Ordinal_34
cmp dword [rsp + 0x160], eax
jne 0x18001a82d
movaps xmm0, xmmword [rsp + 0x140]
movups xmmword [rsp + 0x4a0], xmm0
movaps xmm1, xmmword [rsp + 0x150]
movups xmmword [rsp + 0x4b0], xmm1
mov rax, qword [rsp + 0x90]
mov ebx, 0x100000
cmp rax, rbx
cmovl ebx, eax
mov qword [rsp + 0x78], rbx
mov ecx, ebx
call fcn.180115540
mov r12, rax
mov qword [rsp + 0x58], rax
test rax, rax
je 0x18001a82d
xor edi, edi
mov qword [rsp + 0x20], rdi
lea r9, [rsp + 0x88]
lea r8d, [rdi + 0x20]
mov rdx, rax
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18001a82d
mov dword [rsp + 0x20], r15d
lea r9d, [rdi + 0x20]
lea r8, [rsp + 0x4a0]
mov edx, dword [rsp + 0x88]
mov rcx, r12
call sym.SafeBase64.dll_Ordinal_24
mov r8d, dword [rsp + 0x88]
mov rdx, r12
lea rcx, [rsp + 0x180]
call fcn.180113430
test eax, eax
jne 0x18001a82d
mov r8, rsi
mov edx, 0x1ff
lea rcx, [rsp + 0x4c0]
call fcn.1801259f0
mov word [rsp + 0x6b4], di
lea r8, str.._IX_
mov edx, 0x1ff
lea rcx, [rsp + 0x4c0]
call fcn.180125a58
mov qword [rsp + 0x30], rdi
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
mov edx, 0x40000000
lea r8d, [rdi + 3]
lea rcx, [rsp + 0x4c0]
call sym.SafeBase64.dll_LngCreateFile
mov rdi, rax
mov qword [rsp + 0x70], rax
cmp rax, 0xffffffffffffffff
je 0x18001a82d
xor r9d, r9d
xor r8d, r8d
mov edx, 0x400
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0x400
jne 0x18001a82d
mov rcx, qword [rsp + 0x90]
sub rcx, 0x400
mov qword [rsp + 0x90], rcx
nop dword [rax]
test rcx, rcx
jle 0x18001a784
mov eax, ebx
mov esi, ebx
cmp rcx, rax
cmovle esi, ecx
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x88]
mov r8d, esi
mov rdx, r12
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x18001a82d
mov rdi, r12
mov qword [rsp + 0x68], r12
mov ebx, esi
mov dword [rsp + 0x44], ebx
mov dword [rsp + 0x20], r15d
mov r9d, 0x20
lea r8, [rsp + 0x4a0]
mov rcx, rdi
cmp ebx, 0x200
jbe 0x18001a735
mov edx, 0x200
call sym.SafeBase64.dll_Ordinal_24
add rdi, 0x200
mov qword [rsp + 0x68], rdi
add ebx, 0xfffffe00
mov dword [rsp + 0x44], ebx
jmp 0x18001a6f5
mov edx, ebx
call sym.SafeBase64.dll_Ordinal_24
mov qword [rsp + 0x20], r14
lea r9, [rsp + 0x98]
mov r8d, esi
mov rdx, r12
mov rdi, qword [rsp + 0x70]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18001a82d
mov eax, esi
mov rcx, qword [rsp + 0x90]
sub rcx, rax
mov qword [rsp + 0x90], rcx
mov rbx, qword [rsp + 0x78]
jmp 0x18001a6b0
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor r13d, r13d
mov qword [rsp + 0x60], r13
mov ebx, dword [rsp + 0x48]
mov rsi, qword [rsp + 0x50]
test bl, 1
je 0x18001a7b9
mov edx, ebx
and edx, 0xfffffffe
mov rcx, rsi
call sym.SafeBase64.dll_LngSetFileAttributes
mov r8d, 3
mov rdx, rsi
lea rcx, [rsp + 0x4c0]
call sym.SafeBase64.dll_LngMoveFileEx
mov r14d, eax
mov dword [rsp + 0x40], eax
test eax, eax
jne 0x18001a80e
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x18001a80e
mov rcx, rsi
call sym.SafeBase64.dll_LngDeleteFile
test eax, eax
je 0x18001a80e
lea r8d, [r14 + 3]
mov rdx, rsi
lea rcx, [rsp + 0x4c0]
call sym.SafeBase64.dll_LngMoveFileEx
mov r14d, eax
mov dword [rsp + 0x40], eax
jmp 0x18001a822
test r14d, r14d
jne 0x18001a822
lea rcx, [rsp + 0x4c0]
call sym.SafeBase64.dll_LngDeleteFile
jmp 0x18001a82d
mov edx, ebx
mov rcx, rsi
call sym.SafeBase64.dll_LngSetFileAttributes
nop
test r12, r12
je 0x18001a83a
mov rcx, r12
call fcn.180115548
test r13, r13
je 0x18001a848
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, r14d
jmp 0x18001a42a