Function at 0x499767
Capabilities:
Write file on windows

Disassembly:
push rbp
mov rbp, rsp
sub rsp, 0x190
mov qword [rbp + 0x10], rcx
mov qword [rbp + 0x18], rdx
mov qword [rbp + 0x20], r8
mov rax, qword [rbp + 0x18]
add rax, 0xc
movzx ecx, byte [rax]
cmp ecx, 0
jne 0x49986d
mov eax, 1
mov byte [rbp - 0x30], al
movabs rax, 7
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0x2f]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
lea rax, [rbp - 0x50]
mov r10, rax
mov rcx, r10
call fcn.0049b724
mov eax, 0x20
mov r8, rax
lea rax, [rbp - 0x50]
mov r11, rax
lea rax, [rbp - 0x28]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
mov eax, 0
mov byte [rbp - 8], al
movabs rax, 3
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 7]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
movabs rax, 4
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 4]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
mov rax, qword [rbp + 0x10]
mov ecx, 0x30
mov r8, rcx
lea rcx, [rbp - 0x30]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
jmp 0x499beb
mov rax, qword [rbp + 0x20]
mov rcx, qword [rbp + 0x20]
add rcx, 8
mov edx, dword [rcx]
movsxd rdx, edx
mov rcx, qword [rbp + 0x18]
mov qword [rbp - 0x60], rax
mov rax, qword [rcx]
mov r9, rax
mov r8, rdx
movabs rax, 1
mov r11, rax
mov rax, qword [rbp - 0x60]
mov rax, qword [rax]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fwrite
shl rax, 0x20
shr rax, 0x20
mov dword [rbp - 0x54], eax
mov eax, dword [rbp - 0x54]
cmp eax, 0
jne 0x499a19
mov rax, qword [rbp + 0x20]
add rax, 8
mov ecx, dword [rax]
cmp ecx, 0
je 0x499a19
mov eax, 1
mov byte [rbp - 0x90], al
movabs rax, 7
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0x8f]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
lea rax, [0x0051dcaf]
mov qword [rbp - 0xc0], rax
mov eax, 0xf
mov dword [rbp - 0xb8], eax
mov eax, 1
mov dword [rbp - 0xb4], eax
lea rax, [rsp + 0x20]
mov ecx, 0x10
mov r8, rcx
lea rcx, [rbp - 0xc0]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
lea r11, [rsp + 0x20]
lea rax, [rbp - 0xb0]
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.004531c5
mov eax, 0x20
mov r8, rax
lea rax, [rbp - 0xb0]
mov r11, rax
lea rax, [rbp - 0x88]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
mov eax, 0
mov byte [rbp - 0x68], al
movabs rax, 3
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0x67]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
movabs rax, 4
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0x64]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
mov rax, qword [rbp + 0x10]
mov ecx, 0x30
mov r8, rcx
lea rcx, [rbp - 0x90]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
jmp 0x499beb
mov rax, qword [rbp + 0x18]
mov rcx, qword [rax]
mov r11, rcx
lea rax, [0x0051dcbf]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_fputs
mov dword [rbp - 0xc4], eax
mov eax, dword [rbp - 0xc4]
cmp eax, 0
jge 0x499b94
mov eax, 1
mov byte [rbp - 0xf8], al
movabs rax, 7
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0xf7]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
lea rax, str.could_not_add_newline
mov qword [rbp - 0x128], rax
mov eax, 0x15
mov dword [rbp - 0x120], eax
mov eax, 1
mov dword [rbp - 0x11c], eax
lea rax, [rsp + 0x20]
mov ecx, 0x10
mov r8, rcx
lea rcx, [rbp - 0x128]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
lea r11, [rsp + 0x20]
lea rax, [rbp - 0x118]
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.004531c5
mov eax, 0x20
mov r8, rax
lea rax, [rbp - 0x118]
mov r11, rax
lea rax, [rbp - 0xf0]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
mov eax, 0
mov byte [rbp - 0xd0], al
movabs rax, 3
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0xcf]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
movabs rax, 4
mov r8, rax
mov eax, 0
mov r11, rax
lea rax, [rbp - 0xcc]
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memset
mov rax, qword [rbp + 0x10]
mov ecx, 0x30
mov r8, rcx
lea rcx, [rbp - 0xf8]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
jmp 0x499beb
mov eax, dword [rbp - 0x54]
add eax, 1
mov dword [rbp - 0x15c], eax
mov eax, 4
mov r8, rax
lea rax, [rbp - 0x158]
mov r11, rax
lea rax, [rbp - 0x15c]
mov r10, rax
mov rcx, r10
mov rdx, r11
call fcn.004533f0
mov rax, qword [rbp + 0x10]
mov ecx, 0x30
mov r8, rcx
lea rcx, [rbp - 0x158]
mov r11, rcx
mov r10, rax
mov rcx, r10
mov rdx, r11
call sub.msvcrt.dll_memmove
leave
ret