Function at 0x1403fbd20
Capabilities:
Write file on windows

Disassembly:
push rbx
push rbp
push rsi
push rdi
push r12
push r13
push r14
sub rsp, 0x60
mov rax, qword [0x1406836b8]
xor rax, rsp
mov qword [rsp + 0x58], rax
mov r14, r9
mov rdi, r8
mov r13, rdx
test r8, r8
je 0x1403fbfac
test r9, r9
je 0x1403fbfac
mov ebp, dword [r8 + 4]
xor ebx, ebx
mov r12d, ebp
mov qword [rsp + 0x4c], rbx
and bp, 0xf
shr r12d, 4
movzx eax, bp
dec eax
mov dword [rsp + 0x48], ebx
cmp eax, 9
ja case.0x1403fbd94.1
lea rdx, [0x140000000]
cdqe
mov ecx, dword [rdx + rax*4 + 0x3fbfd0]
add rcx, rdx
jmp rcx
mov edx, dword [r8 + 8]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rsi, rax
test rax, rax
je 0x1403fbe87
lea r8, [rdi + 0xc]
mov qword [rsp + 0xa0], r15
movsxd r15, dword [rdi + 8]
cmp bx, word [r8]
jne 0x1403fbdd4
mov byte [rax], bl
jmp 0x1403fbdf6
mov qword [rsp + 0x38], rbx
xor edx, edx
mov qword [rsp + 0x30], rbx
xor ecx, ecx
mov dword [rsp + 0x28], r15d
mov qword [rsp + 0x20], rsi
lea r9d, [rdx - 1]
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
mov rcx, rsi
mov byte [r15 + rsi - 1], bl
call qword [sym.imp.KERNEL32.dll_lstrlenA]
mov r15, qword [rsp + 0xa0]
lea ecx, [rax + 1]
jmp 0x1403fbef4
cmp dword [r8 + 8], 8
je 0x1403fbe25
mov ebx, 0x80004005
jmp 0x1403fbfb1
mov edx, 8
lea ecx, [rdx + 0x38]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rsi, rax
test rax, rax
je 0x1403fbe87
mov r8d, dword [rdi + 8]
lea rdx, [rdi + 0xc]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rdi + 8]
mov eax, 1
jmp 0x1403fbef6
cmp dword [r8 + 8], 2
jne case.0x1403fbd94.1
mov edx, 2
lea ecx, [rdx + 0x3e]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rsi, rax
test rax, rax
jne 0x1403fbe44
mov ebx, 0x8007000e
jmp 0x1403fbfb1
cmp dword [r8 + 8], 4
jne case.0x1403fbd94.1
mov edx, 4
lea ecx, [rdx + 0x3c]
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rsi, rax
test rax, rax
jne 0x1403fbe44
mov ebx, 0x8007000e
jmp 0x1403fbfb1
mov edx, dword [r8 + 8]
mov ecx, 0x40
call qword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalLock]
mov rsi, rax
test rax, rax
je 0x1403fbe87
mov r8d, dword [rdi + 8]
lea rdx, [rdi + 0xc]
mov rcx, rax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [rdi + 8]
mov eax, ecx
mov word [rsp + 0x48], r12w
mov word [rsp + 0x4a], bp
mov dword [rsp + 0x4c], eax
cmp ecx, 4
jbe 0x1403fbf24
mov eax, dword [r14]
mov dword [rsp + 0x50], eax
add eax, ecx
and ecx, 1
mov dword [r14], eax
test cl, cl
je 0x1403fbf5e
inc eax
mov dword [r14], eax
jmp 0x1403fbf5e
mov rdx, rsi
test ecx, ecx
je 0x1403fbf5e
mov r9d, dword [rsp + 0x50]
mov r8d, ebx
mov r10d, ecx
nop word [rax + rax]
movzx eax, byte [rdx]
lea rdx, [rdx + 1]
mov ecx, r8d
add r8d, 8
shl eax, cl
add r9d, eax
mov dword [rsp + 0x50], r9d
sub r10, 1
jne 0x1403fbf40
lea r9, [rsp + 0x40]
mov qword [rsp + 0x20], rbx
mov r8d, reloc.OLEAUT32.dll_VariantTimeToDosDateTime
lea rdx, [rsp + 0x48]
mov rcx, r13
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
mov ecx, 0x8004e009
cmove ebx, ecx
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GlobalHandle]
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_GlobalFree]
jmp 0x1403fbfb1
mov ebx, 0x80070057
mov eax, ebx
mov rcx, qword [rsp + 0x58]
xor rcx, rsp
call fcn.14039bbb0
add rsp, 0x60
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
pop rbx
ret