Function at 0x1400688b0
Capabilities:
Write file on windows

Disassembly:
push rbp
push rbx
push rsi
push rdi
push r12
push r14
push r15
lea rbp, [rsp - 0x450]
sub rsp, 0x550
mov r15, rdx
mov rbx, rcx
xor edx, edx
lea rcx, [rbp + 0x50]
mov r8d, 0x400
call fcn.14014d290
lea rsi, [r15 + 0x1c]
xor r12d, r12d
mov rdi, 0xffffffffffffffff
cmp word [rsi], r12w
jne 0x140068916
test rsi, rsi
je 0x140068916
mov r9, rdi
lea r8, [0x1401b93dc]
mov edx, 0x200
mov rcx, rsi
call fcn.14003c218
mov r8, rsi
jmp 0x14006891e
mov r8, rsi
test rsi, rsi
je 0x14006896c
mov qword [rsp + 0x38], r12
lea rax, [rbp + 0x50]
mov qword [rsp + 0x30], r12
mov r9d, edi
mov dword [rsp + 0x28], 0x400
xor edx, edx
xor ecx, ecx
mov qword [rsp + 0x20], rax
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
test eax, eax
jg 0x14006896c
jne 0x140068963
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x7a
jne 0x140068963
mov byte [rbp + 0x44f], r12b
mov rax, rsi
jmp 0x140068974
mov byte [rbp + 0x50], r12b
mov rax, rsi
jmp 0x140068974
mov rax, rsi
test rsi, rsi
je 0x14006898c
mov r9, rdi
nop word [rax + rax]
inc r9
cmp word [rax + r9*2], r12w
jne 0x140068980
jmp 0x14006898f
mov r9d, r12d
mov qword [rsp + 0x38], r12
mov r8, rsi
mov qword [rsp + 0x30], r12
xor edx, edx
mov dword [rsp + 0x28], r12d
mov ecx, 0xfde9
mov qword [rsp + 0x20], r12
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
movsxd r14, eax
test rsi, rsi
je 0x1400689cc
nop dword [rax + rax]
inc rdi
cmp word [rsi + rdi*2], r12w
jne 0x1400689c0
jmp 0x1400689cf
mov edi, r12d
mov qword [rsp + 0x38], r12
lea rax, [rbp + 0x50]
mov qword [rsp + 0x30], r12
mov r9d, edi
mov dword [rsp + 0x28], 0x400
mov r8, rsi
xor edx, edx
mov qword [rsp + 0x20], rax
mov ecx, 0xfde9
call qword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
cmp byte [rbx + 0x240], r12b
je 0x140068a0e
mov rcx, rbx
call fcn.1400682e0
mov eax, dword [r15 + 0x10]
test eax, eax
jne 0x140068a73
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_GetTimeZoneInformation]
lea r8, [rbp - 0x78]
mov rdx, r15
lea rcx, [rbp - 0x60]
call qword [sym.imp.KERNEL32.dll_SystemTimeToTzSpecificLocalTime]
lea rdx, [rbp - 0x80]
lea rcx, [rbp - 0x78]
call qword [sym.imp.KERNEL32.dll_SystemTimeToFileTime]
lea r8, [rbp + 0x490]
lea rdx, [rbp + 0x498]
lea rcx, [rbp - 0x80]
call qword [sym.imp.KERNEL32.dll_FileTimeToDosDateTime]
movzx eax, word [rbp + 0x490]
mov word [rsp + 0x68], ax
movzx eax, word [rbp + 0x498]
mov word [rsp + 0x6a], ax
mov eax, dword [rsp + 0x68]
mov dword [rbx + 0x2d8], eax
mov dword [rbx + 0x2c4], 0x800
mov dword [rbx + 0x2dc], r12d
mov dword [rbx + 0x2c8], 8
mov qword [rbx + 0x2a8], r12
mov rax, qword [r15 + 0x420]
mov qword [rbx + 0x2e0], rax
mov dword [rbx + 0x2e8], r14d
mov rcx, qword [rbx + 0x228]
cmp rcx, 0xffffffffffffffff
je 0x140068ffb
mov r9d, 1
mov qword [rsp + 0x78], r12
lea r8, [rsp + 0x7c]
xor edx, edx
call qword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, 0xffffffff
mov dword [rsp + 0x78], eax
cmp eax, esi
jne 0x140068af4
call qword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x140068ffb
cmp qword [rsp + 0x78], 0xffffffffffffffff
je 0x140068ffb
lea rcx, [rbx + 0x220]
call fcn.140004180
mov dword [rbx + 0x2b0], eax
cmp qword [r15 + 0x420], rsi
jb 0x140068b22
mov byte [rbx + 0x2ec], 1
lea eax, [r14 + 0x2e]
mov ecx, eax
lea rdx, [0x14014fdc0]
mov dword [rbx + 0x2c0], eax
call fcn.14002e8b0
mov qword [rbx + 0x2b8], rax
test rax, rax
je 0x140068ffb
mov dword [rax], 0x2014b50
lea rdx, [rbp + 0x50]
mov rax, qword [rbx + 0x2b8]
mov edi, 0x2d
mov r8, r14
mov word [rax + 4], r12w
mov eax, shutdown
mov rcx, qword [rbx + 0x2b8]
cmp byte [rbx + 0x2ec], r12b
cmovne eax, edi
mov byte [rcx + 6], al
mov byte [rcx + 7], r12b
mov ecx, dword [rbx + 0x2c4]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 8], cl
shr ecx, 8
mov byte [rax + 9], cl
mov ecx, dword [rbx + 0x2c8]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 0xa], cl
shr ecx, 8
mov byte [rax + 0xb], cl
mov ecx, dword [rbx + 0x2d8]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 0xc], cl
shr ecx, 8
mov byte [rax + 0xd], cl
shr ecx, 8
mov byte [rax + 0xe], cl
shr ecx, 8
mov byte [rax + 0xf], cl
mov rax, qword [rbx + 0x2b8]
mov dword [rax + 0x10], r12d
mov rax, qword [rbx + 0x2b8]
mov dword [rax + 0x14], esi
mov rax, qword [rbx + 0x2b8]
mov dword [rax + 0x18], esi
mov eax, r14d
mov rcx, qword [rbx + 0x2b8]
shr eax, 8
mov byte [rcx + 0x1c], r14b
mov byte [rcx + 0x1d], al
mov rax, qword [rbx + 0x2b8]
mov word [rax + 0x1e], r12w
mov rax, qword [rbx + 0x2b8]
mov word [rax + 0x20], r12w
mov rax, qword [rbx + 0x2b8]
mov word [rax + 0x22], r12w
mov ecx, dword [r15 + 0x14]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 0x24], cl
shr ecx, 8
mov byte [rax + 0x25], cl
mov ecx, dword [r15 + 0x18]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 0x26], cl
shr ecx, 8
mov byte [rax + 0x27], cl
shr ecx, 8
mov byte [rax + 0x28], cl
shr ecx, 8
mov byte [rax + 0x29], cl
mov ecx, dword [rbx + 0x2b0]
mov rax, qword [rbx + 0x2b8]
mov byte [rax + 0x2a], cl
shr ecx, 8
mov byte [rax + 0x2b], cl
shr ecx, 8
mov byte [rax + 0x2c], cl
shr ecx, 8
mov byte [rax + 0x2d], cl
mov rcx, qword [rbx + 0x2b8]
add rcx, 0x2e
call fcn.14014cbf0
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rbp + 0x4a0], 0x4034b50
mov dword [rsp + 0x4c], eax
cmp rcx, 0xffffffffffffffff
je 0x140068cda
lea r9, [rsp + 0x4c]
mov qword [rsp + 0x20], r12
lea r8d, [rdi - 0x29]
lea rdx, [rbp + 0x4a0]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068cd6
mov eax, r12d
mov dword [rsp + 0x4c], eax
jmp 0x140068cda
mov eax, dword [rsp + 0x4c]
lock add qword [0x1401f3d68], rax
cmp byte [rbx + 0x2ec], r12b
mov edx, shutdown
mov r8d, 2
mov rcx, rbx
cmovne edx, edi
call fcn.1400690b0
mov eax, dword [rbx + 0x2c4]
mov rcx, qword [rbx + 0x228]
mov byte [rsp + 0x6c], al
shr eax, 8
mov byte [rsp + 0x6d], al
mov eax, r12d
mov dword [rsp + 0x50], eax
cmp rcx, 0xffffffffffffffff
je 0x140068d50
lea r9, [rsp + 0x50]
mov qword [rsp + 0x20], r12
mov r8d, 2
lea rdx, [rsp + 0x6c]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068d4c
mov eax, r12d
mov dword [rsp + 0x50], eax
jmp 0x140068d50
mov eax, dword [rsp + 0x50]
lock add qword [0x1401f3d68], rax
mov eax, dword [rbx + 0x2c8]
mov rcx, qword [rbx + 0x228]
mov byte [rsp + 0x70], al
shr eax, 8
mov byte [rsp + 0x71], al
mov eax, r12d
mov dword [rsp + 0x54], eax
cmp rcx, 0xffffffffffffffff
je 0x140068da9
lea r9, [rsp + 0x54]
mov qword [rsp + 0x20], r12
mov r8d, 2
lea rdx, [rsp + 0x70]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068da5
mov eax, r12d
mov dword [rsp + 0x54], eax
jmp 0x140068da9
mov eax, dword [rsp + 0x54]
lock add qword [0x1401f3d68], rax
mov edx, dword [rbx + 0x2d8]
mov r8d, 4
mov rcx, rbx
call fcn.1400690b0
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rbp + 0x4a8], r12d
mov dword [rsp + 0x58], eax
cmp rcx, 0xffffffffffffffff
je 0x140068e0e
lea r9, [rsp + 0x58]
mov qword [rsp + 0x20], r12
mov r8d, 4
lea rdx, [rbp + 0x4a8]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068e0a
mov eax, r12d
mov dword [rsp + 0x58], eax
jmp 0x140068e0e
mov eax, dword [rsp + 0x58]
lock add qword [0x1401f3d68], rax
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rsp + 0x40], esi
mov dword [rsp + 0x5c], eax
cmp rcx, 0xffffffffffffffff
je 0x140068e5a
lea r9, [rsp + 0x5c]
mov qword [rsp + 0x20], r12
mov r8d, 4
lea rdx, [rsp + 0x40]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068e56
mov eax, r12d
mov dword [rsp + 0x5c], eax
jmp 0x140068e5a
mov eax, dword [rsp + 0x5c]
lock add qword [0x1401f3d68], rax
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rsp + 0x44], esi
mov dword [rsp + 0x60], eax
cmp rcx, 0xffffffffffffffff
je 0x140068ea6
lea r9, [rsp + 0x60]
mov qword [rsp + 0x20], r12
mov r8d, 4
lea rdx, [rsp + 0x44]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068ea2
mov eax, r12d
mov dword [rsp + 0x60], eax
jmp 0x140068ea6
mov eax, dword [rsp + 0x60]
lock add qword [0x1401f3d68], rax
mov r8d, 2
mov edx, r14d
mov rcx, rbx
call fcn.1400690b0
movzx eax, byte [rbx + 0x2ec]
mov r8d, 2
neg al
mov rcx, rbx
sbb edx, edx
and edx, 0x14
call fcn.1400690b0
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rsp + 0x48], eax
cmp rcx, 0xffffffffffffffff
je 0x140068f1c
test r14d, r14d
je 0x140068f1c
lea r9, [rsp + 0x48]
mov qword [rsp + 0x20], r12
mov r8d, r14d
lea rdx, [rbp + 0x50]
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068f18
mov eax, r12d
mov dword [rsp + 0x48], eax
jmp 0x140068f1c
mov eax, dword [rsp + 0x48]
lock add qword [0x1401f3d68], rax
cmp dword [rsp + 0x48], r14d
jne 0x140068ffb
cmp byte [rbx + 0x2ec], r12b
je 0x140068f82
mov rcx, qword [rbx + 0x228]
mov eax, r12d
mov dword [rsp + 0x64], eax
cmp rcx, 0xffffffffffffffff
je 0x140068f7a
lea r9, [rsp + 0x64]
mov qword [rsp + 0x20], r12
mov r8d, shutdown
lea rdx, str.reserv_for_extra_fld
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x140068f76
mov eax, r12d
mov dword [rsp + 0x64], eax
jmp 0x140068f7a
mov eax, dword [rsp + 0x64]
lock add qword [0x1401f3d68], rax
mov rax, qword [rbx + 0x2d0]
test rax, rax
jne 0x140068fab
lea rdx, [0x14014fdc0]
mov ecx, 0x100000
call fcn.14002e8b0
mov qword [rbx + 0x2d0], rax
test rax, rax
je 0x140068ffb
mov edx, dword [rbx]
lea rcx, [rbx + 0x248]
mov dword [rbx + 0x250], r12d
mov dword [rbx + 0x268], 0x100000
mov qword [rbx + 0x260], rax
mov qword [rbx + 0x258], r12
mov qword [rbx + 0x270], r12
call fcn.140077a80
test eax, 0xfffffffd
jne 0x140068ffb
mov dword [rbx + 0x2a8], 1
mov al, 1
mov byte [rbx + 0x240], 1
jmp 0x140068ffd
xor al, al
add rsp, 0x550
pop r15
pop r14
pop r12
pop rdi
pop rsi
pop rbx
pop rbp
ret