Function at 0x180041750
Capabilities:
Write file on windows

Disassembly:
push rbx
push rsi
push rdi
sub rsp, 0x3b0
mov rax, qword [0x1800964f0]
xor rax, rsp
mov qword [rsp + 0x3a0], rax
cmp dword [rcx + 8], 0xffffffff
mov rbx, r8
mov esi, edx
mov rdi, rcx
je 0x180041783
mov rcx, qword [rcx]
call fcn.180040e20
mov rcx, qword [rdi]
mov dword [rdi + 8], 0xffffffff
cmp esi, dword [rcx + 8]
jl 0x18004179c
mov eax, 0x10000
jmp 0x180041a36
cmp esi, dword [rcx + 0x14]
jge 0x1800417a6
call fcn.180040480
mov rax, qword [rdi]
cmp dword [rax + 0x14], esi
jge 0x1800417c1
nop
mov rcx, qword [rdi]
call fcn.1800404e0
mov r11, qword [rdi]
cmp dword [r11 + 0x14], esi
jl 0x1800417b0
cmp esi, 0xffffffff
jl 0x1800417d5
lea r8, [rsp + 0x50]
mov edx, esi
mov rcx, rdi
call fcn.180041040
test byte [rsp + 0x158], 0x10
je 0x18004181b
movzx eax, byte [rbx]
cmp al, 0x2f
je 0x18004180a
cmp al, 0x5c
je 0x18004180a
test al, al
je 0x1800417f4
cmp byte [rbx + 1], 0x3a
je 0x18004180a
lea rcx, [rdi + 0x150]
mov rdx, rbx
call fcn.180041620
xor eax, eax
jmp 0x180041a36
mov rdx, rbx
xor ecx, ecx
call fcn.180041620
xor eax, eax
jmp 0x180041a36
movzx eax, byte [rbx]
mov qword [rsp + 0x3d8], rbp
mov r9, rbx
mov rcx, rbx
test al, al
je 0x180041846
cmp al, 0x2f
je 0x180041838
cmp al, 0x5c
jne 0x18004183c
lea r9, [rcx + 1]
mov al, byte [rcx + 1]
inc rcx
test al, al
jne 0x180041830
lea rdx, [rsp + 0x180]
mov rcx, rbx
sub rdx, rbx
nop word [rax + rax]
movzx eax, byte [rcx]
inc rcx
mov byte [rdx + rcx - 1], al
test al, al
jne 0x180041860
cmp r9, rbx
jne 0x18004187c
mov byte [rsp + 0x180], al
jmp 0x1800418a8
mov rax, r9
sub rax, rbx
mov byte [rsp + rax + 0x180], 0
movzx eax, byte [rsp + 0x180]
cmp al, 0x2f
je 0x1800418e7
cmp al, 0x5c
je 0x1800418e7
test al, al
je 0x1800418a8
cmp byte [rsp + 0x181], 0x3a
je 0x1800418e7
mov qword [rsp + 0x20], r9
lea r8, [rdi + 0x150]
lea rdx, str._s_s_s
lea r9, [rsp + 0x180]
lea rcx, [rsp + 0x290]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x180]
lea rcx, [rdi + 0x150]
call fcn.180041620
jmp 0x180041913
lea r8, [rsp + 0x180]
lea rdx, str._s_s
lea rcx, [rsp + 0x290]
call qword [sym.imp.USER32.dll_wsprintfA]
lea rdx, [rsp + 0x180]
xor ecx, ecx
call fcn.180041620
mov eax, dword [rsp + 0x158]
xor esi, esi
lea rcx, [rsp + 0x290]
mov qword [rsp + 0x30], rsi
mov dword [rsp + 0x28], eax
xor r9d, r9d
xor r8d, r8d
mov edx, 0x40000000
mov dword [rsp + 0x20], 2
call qword [sym.imp.KERNEL32.dll_CreateFileA]
mov rbp, rax
cmp rax, 0xffffffffffffffff
jne 0x180041959
mov eax, 0x200
jmp 0x180041a2e
mov rdx, qword [rdi + 0x140]
mov rcx, qword [rdi]
call fcn.180040860
cmp qword [rdi + 0x148], rsi
jne 0x180041990
mov ecx, 0x4000
call fcn.18004f9f8
mov qword [rdi + 0x148], rax
nop word [rax + rax]
mov rdx, qword [rdi + 0x148]
mov rcx, qword [rdi]
lea r9, [rsp + 0x40]
mov r8d, 0x4000
call fcn.180040a90
mov ebx, eax
cmp eax, 0xffffff96
je 0x180041a16
test eax, eax
js 0x1800419e5
test eax, eax
jle 0x1800419da
mov rdx, qword [rdi + 0x148]
lea r9, [rsp + 0x44]
mov r8d, eax
mov rcx, rbp
mov qword [rsp + 0x20], rsi
call qword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x1800419ec
cmp byte [rsp + 0x40], sil
jne 0x1800419f3
test ebx, ebx
jne 0x180041990
mov esi, 0x5000000
jmp 0x180041a1b
mov esi, 0x400
jmp 0x180041a1b
lea r9, [rsp + 0x16c]
lea r8, [rsp + 0x15c]
lea rdx, [rsp + 0x164]
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_SetFileTime]
jmp 0x180041a1b
mov esi, 0x1000
mov rcx, rbp
call qword [sym.imp.KERNEL32.dll_CloseHandle]
mov rcx, qword [rdi]
call fcn.180040e20
mov eax, esi
mov rbp, qword [rsp + 0x3d8]
mov rcx, qword [rsp + 0x3a0]
xor rcx, rsp
call fcn.180050540
add rsp, 0x3b0
pop rdi
pop rsi
pop rbx
ret