Function at 0x180057900
Capabilities:
Write file on windows

Disassembly:
push rbp
push rsi
push rdi
push r12
push r13
push r14
push r15
lea rbp, [rsp - 0x30]
sub rsp, 0x130
mov qword [rsp + 0x70], 0xfffffffffffffffe
mov qword [rsp + 0x188], rbx
mov rax, qword [0x1801485f0]
xor rax, rsp
mov qword [rbp + 0x20], rax
mov r15, r8
mov r12, rdx
mov r14, rcx
cmp qword [rdx + 0x10], 0
jne 0x18005794e
xor al, al
jmp 0x180057dcc
cmp byte [rcx + 0x18], 0
je 0x180057947
xor r13d, r13d
mov qword [rbp - 0x30], r13
mov qword [rbp - 0x28], r13
mov qword [rbp - 0x28], 0xf
mov qword [rbp - 0x30], r13
mov byte [rbp - 0x40], r13b
mov rax, qword [rcx + 8]
mov rdi, qword [rax]
cmp rdi, rax
je 0x180057af8
nop
mov rax, qword [rdi + 0x40]
cmp qword [rax + 8], 0
je 0x180057a9b
lea r8, [rdi + 0x20]
lea rdx, [rbp - 0x60]
mov rcx, r14
call fcn.180059010
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rbp - 0x40]
call fcn.180015990
nop
cmp qword [rbp - 0x48], 0x10
jb 0x1800579c4
mov rcx, qword [rbp - 0x60]
call fcn.1800b5700
mov qword [rbp - 0x48], 0xf
mov qword [rbp - 0x50], r13
mov byte [rbp - 0x60], 0
mov rax, qword [rdi + 0x40]
mov rbx, qword [rax]
mov rbx, qword [rbx]
cmp rbx, qword [rax]
je 0x180057a9b
nop word [rax + rax]
lea r8, [rbx + 0x20]
lea r9, [r8 + 0x20]
lea rdx, [rbp - 0x20]
mov rcx, r14
call fcn.180059210
nop
or r9, 0xffffffffffffffff
xor r8d, r8d
mov rdx, rax
lea rcx, [rbp - 0x40]
call fcn.180015990
nop
cmp qword [rbp - 8], 0x10
jb 0x180057a29
mov rcx, qword [rbp - 0x20]
call fcn.1800b5700
mov qword [rbp - 8], 0xf
mov qword [rbp - 0x10], r13
mov byte [rbp - 0x20], 0
cmp byte [rbx + 0x19], 0
jne 0x180057a8e
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x180057a6e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x180057a8e
nop word [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x180057a60
jmp 0x180057a8e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x180057a8b
cmp rbx, qword [rax + 0x10]
jne 0x180057a8b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x180057a78
mov rbx, rax
mov rax, qword [rdi + 0x40]
cmp rbx, qword [rax]
jne 0x1800579f0
cmp byte [rdi + 0x19], 0
jne 0x180057aee
mov rax, qword [rdi + 0x10]
cmp byte [rax + 0x19], 0
jne 0x180057ace
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x180057aee
nop word [rax + rax]
mov rdi, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x180057ac0
jmp 0x180057aee
mov rax, qword [rdi + 8]
cmp byte [rax + 0x19], 0
jne 0x180057aeb
cmp rdi, qword [rax + 0x10]
jne 0x180057aeb
mov rdi, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x180057ad8
mov rdi, rax
cmp rdi, qword [r14 + 8]
jne 0x180057980
lea rdx, [rbp - 0x40]
lea rcx, [rbp]
call fcn.180054570
nop
mov qword [rbp - 0x50], r13
mov qword [rbp - 0x48], r13
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], r13
mov word [rbp - 0x60], r13w
xor r8d, r8d
lea rdx, [0x180100a4c]
lea rcx, [rbp - 0x60]
call fcn.1800166f0
nop
mov dword [rsp + 0x58], 0x18
mov dword [rsp + 0x68], r13d
lea rax, [rsp + 0x78]
mov qword [rsp + 0x60], rax
call fcn.1800282f0
test rax, rax
je 0x180057c49
mov edx, 1
lea rcx, [rsp + 0x78]
call rax
test eax, eax
je 0x180057c49
call fcn.180028380
test rax, rax
je 0x180057c49
xor r9d, r9d
xor r8d, r8d
lea edx, [r9 + 1]
lea rcx, [rsp + 0x78]
call rax
test eax, eax
je 0x180057c49
call fcn.1800285c0
test eax, eax
je 0x180057c49
cmp qword [rbp - 0x50], 0
je 0x180057c49
mov qword [rsp + 0x48], r13
call fcn.180028410
test rax, rax
je 0x180057c49
lea rcx, [rbp - 0x60]
cmp qword [rbp - 0x48], 8
cmovae rcx, qword [rbp - 0x60]
xor r9d, r9d
lea r8, [rsp + 0x48]
lea edx, [r9 + 1]
call rax
test eax, eax
je 0x180057c49
mov qword [rsp + 0x50], r13
mov dword [rsp + 0x40], r13d
mov dword [rsp + 0x44], r13d
call fcn.1800284a0
test rax, rax
je 0x180057c49
lea r9, [rsp + 0x44]
lea r8, [rsp + 0x50]
lea rdx, [rsp + 0x40]
mov rcx, qword [rsp + 0x48]
call rax
test eax, eax
je 0x180057c49
call fcn.1800282f0
test rax, rax
je 0x180057c49
mov edx, 1
lea rcx, [rsp + 0x78]
call rax
test eax, eax
je 0x180057c49
call fcn.180028530
test rax, rax
je 0x180057c49
xor r9d, r9d
mov r8, qword [rsp + 0x50]
lea edx, [r9 + 1]
lea rcx, [rsp + 0x78]
call rax
nop
cmp qword [rbp - 0x48], 8
jb 0x180057c59
mov rcx, qword [rbp - 0x60]
call fcn.1800b5700
mov qword [rbp - 0x48], 7
mov qword [rbp - 0x50], r13
mov word [rbp - 0x60], r13w
cmp qword [r15 + 0x18], 8
jb 0x180057c74
mov r15, qword [r15]
mov r9, r15
xor r8d, r8d
xor edx, edx
lea rcx, [rsp + 0x58]
call qword [sym.imp.KERNEL32.dll_CreateEventW]
mov rbx, rax
test rax, rax
je 0x180057cca
call qword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0xb7
jne 0x180057cca
mov edx, 0xbb8
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_WaitForSingleObject]
cmp eax, 0x102
jne 0x180057cca
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
xor bl, bl
jmp 0x180057d89
mov rdx, r12
lea rcx, [rbp - 0x20]
call fcn.18001b8b0
nop
mov r14, qword [rbp + 0x10]
lea rsi, [rbp]
cmp qword [rbp + 0x18], 0x10
cmovae rsi, qword [rbp]
cmp qword [rax + 0x10], 0
je 0x180057d54
cmp qword [rax + 0x18], 8
jb 0x180057cfa
mov rax, qword [rax]
mov qword [rsp + 0x30], r13
mov dword [rsp + 0x28], 0x80
mov dword [rsp + 0x20], 2
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rdi, rax
cmp rax, 0xffffffffffffffff
je 0x180057d54
mov dword [rsp + 0x40], r13d
mov qword [rsp + 0x20], r13
lea r9, [rsp + 0x40]
mov r8d, r14d
mov rdx, rsi
mov rcx, rax
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, rdi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
nop
cmp qword [rbp - 8], 8
jb 0x180057d64
mov rcx, qword [rbp - 0x20]
call fcn.1800b5700
mov qword [rbp - 8], 7
mov qword [rbp - 0x10], r13
mov word [rbp - 0x20], r13w
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_SetEvent]
mov rcx, rbx
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov bl, 1
cmp qword [rbp + 0x18], 0x10
jb 0x180057d99
mov rcx, qword [rbp]
call fcn.1800b5700
mov qword [rbp + 0x18], 0xf
mov qword [rbp + 0x10], r13
mov byte [rbp], 0
cmp qword [rbp - 0x28], 0x10
jb 0x180057db9
mov rcx, qword [rbp - 0x40]
call fcn.1800b5700
mov qword [rbp - 0x28], 0xf
mov qword [rbp - 0x30], r13
mov byte [rbp - 0x40], 0
movzx eax, bl
mov rcx, qword [rbp + 0x20]
xor rcx, rsp
call fcn.1800b6c40
mov rbx, qword [rsp + 0x188]
add rsp, 0x130
pop r15
pop r14
pop r13
pop r12
pop rdi
pop rsi
pop rbp
ret