Function at 0x18007b8a4
Capabilities:
Write file on windows

Disassembly:
mov qword [rsp + 0x10], rbx
push rsi
push rdi
push r12
mov eax, 0x43a0
call fcn.1800a85f0
sub rsp, rax
mov rax, qword [0x1800f18c0]
xor rax, rsp
mov qword [rsp + 0x4390], rax
cmp dword [rsp + 0x43e0], 3
mov r12d, r9d
mov rsi, r8
mov ebx, edx
mov rdi, rcx
je 0x18007bb63
cmp dword [rsp + 0x43e0], 2
je 0x18007b903
cmp dword [rsp + 0x43e0], 1
je 0x18007b903
mov eax, 0x10000
jmp 0x18007bbe4
cmp dword [rcx + 8], 0xffffffff
je 0x18007b911
mov rcx, qword [rcx]
call fcn.18007991c
mov rcx, qword [rdi]
or dword [rdi + 8], 0xffffffff
cmp ebx, dword [rcx + 8]
jge 0x18007b8f9
cmp ebx, dword [rcx + 0x14]
jge 0x18007b927
call fcn.18007954c
mov rax, qword [rdi]
cmp dword [rax + 0x14], ebx
jge 0x18007b940
mov rcx, qword [rdi]
call fcn.1800795a8
mov r11, qword [rdi]
cmp dword [r11 + 0x14], ebx
jl 0x18007b92f
lea r8, [rsp + 0x50]
mov edx, ebx
mov rcx, rdi
call fcn.180079a1c
test byte [rsp + 0x158], 0x10
je 0x18007b998
cmp dword [rsp + 0x43e0], 1
jne 0x18007b96a
xor eax, eax
jmp 0x18007bbe4
lea rdx, [rsp + 0x180]
lea rcx, [rsp + 0x54]
mov r8d, 0x103
call fcn.180078b34
lea rcx, [rdi + 0x13c]
lea rdx, [rsp + 0x180]
call fcn.180079e5c
jmp 0x18007b963
cmp dword [rsp + 0x43e0], 1
je 0x18007baa7
movzx eax, word [rsi]
mov rbx, rsi
mov rcx, rsi
test ax, ax
je 0x18007ba77
cmp ax, 0x2f
je 0x18007b9c4
cmp ax, 0x5c
jne 0x18007b9c8
lea rbx, [rcx + 2]
add rcx, 2
mov ax, word [rcx]
test ax, ax
jne 0x18007b9b8
cmp rbx, rsi
je 0x18007ba77
lea rcx, [rsp + 0x180]
mov rdx, rsi
call fcn.180090b10
sub rbx, rsi
sar rbx, 1
and word [rsp + rbx*2 + 0x17e], 0
cmp word [rsp + 0x180], 0x2f
je 0x18007ba22
cmp word [rsp + 0x180], 0x5c
je 0x18007ba22
cmp word [rsp + 0x182], 0x3a
je 0x18007ba22
xor r12b, r12b
jmp 0x18007ba25
mov r12b, 1
lea rdx, [0x1800b7db8]
lea rcx, [rsp + 0x180]
call fcn.18008ffa0
lea rdx, [0x1800b7db0]
lea rcx, [rsp + 0x180]
mov rbx, rax
call fcn.18008ffa0
test rax, rax
setne cl
test rbx, rbx
setne al
or cl, al
or cl, r12b
jne 0x18007ba77
lea rcx, [rdi + 0x13c]
lea rdx, [rsp + 0x180]
call fcn.180079e5c
and qword [rsp + 0x30], 0
mov eax, dword [rsp + 0x158]
xor r9d, r9d
mov dword [rsp + 0x28], eax
xor r8d, r8d
mov edx, 0x40000000
mov rcx, rsi
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileW]
mov rsi, rax
cmp rsi, 0xffffffffffffffff
jne 0x18007bab7
mov eax, 0x200
jmp 0x18007bbe4
mov rcx, qword [rdi]
call fcn.18007b500
xor bl, bl
mov r12d, 0x4000
jmp 0x18007baee
je 0x18007bb07
and qword [rsp + 0x20], 0
lea r9, [rsp + 0x40]
lea rdx, [rsp + 0x390]
mov r8d, eax
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x18007bb05
mov rcx, qword [rdi]
lea rdx, [rsp + 0x390]
mov r8d, r12d
call fcn.18007b634
test eax, eax
jns 0x18007bac9
mov bl, 1
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_GetFileType]
cmp eax, 1
jne 0x18007bb3a
test bl, bl
jne 0x18007bb3a
lea r9, [rsp + 0x16c]
lea r8, [rsp + 0x15c]
lea rdx, [rsp + 0x164]
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_SetFileTime]
cmp dword [rsp + 0x43e0], 1
je 0x18007bb4d
mov rcx, rsi
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi]
call fcn.18007991c
neg bl
sbb eax, eax
and eax, 0x400
jmp 0x18007bbe4
cmp edx, dword [rcx + 8]
je 0x18007bbb4
cmp dword [rcx + 8], 0xffffffff
je 0x18007bb76
mov rcx, qword [rcx]
call fcn.18007991c
mov rcx, qword [rdi]
or dword [rdi + 8], 0xffffffff
cmp ebx, dword [rcx + 8]
jge 0x18007b8f9
cmp ebx, dword [rcx + 0x14]
jge 0x18007bb90
call fcn.18007954c
mov rax, qword [rdi]
cmp dword [rax + 0x14], ebx
jge 0x18007bba9
mov rcx, qword [rdi]
call fcn.1800795a8
mov r11, qword [rdi]
cmp dword [r11 + 0x14], ebx
jl 0x18007bb98
mov rcx, qword [rdi]
call fcn.18007b500
mov dword [rdi + 8], ebx
mov rcx, qword [rdi]
mov r8d, r12d
mov rdx, rsi
call fcn.18007b634
test eax, eax
mov ebx, eax
jle 0x18007bbcf
mov eax, 0x600
jmp 0x18007bbe4
mov rcx, qword [rdi]
call fcn.18007991c
or dword [rdi + 8], 0xffffffff
neg ebx
sbb eax, eax
and eax, 0x5000000
mov rcx, qword [rsp + 0x4390]
xor rcx, rsp
call fcn.180087cc0
mov rbx, qword [rsp + 0x43c8]
add rsp, 0x43a0
pop r12
pop rdi
pop rsi
ret