Function at 0x402970
Capabilities:
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x68
movaps xmmword [rsp + 0x40], xmm6
movaps xmmword [rsp + 0x50], xmm7
mov rsi, qword [0x005062c0]
mov rbx, qword [rsi + 8]
cmp rbx, qword [rsi + 0x10]
jae 0x4035d6
mov rdi, qword [0x00506110]
jmp 0x4029c4
mov rax, qword [rsi + 0x10]
add rbx, 0x128
cmp rax, rbx
jbe 0x402a7a
mov qword [rbx + 0xd0], 0
mov rdx, rbx
mov rcx, rbx
call fcn.00402740
test rax, rax
je 0x4029e9
cmp qword [rax + 8], rbx
je 0x4031d3
mov dword [rbx + 0xc8], 0
mov dword [rbx + 0xe0], 0
mov dword [rbx + 0xdc], 0
mov dword [rbx + 0x100], 0
mov r10d, dword [rdi]
mov qword [rbx + 0xe8], 0
mov qword [rbx + 0xf0], 0
mov qword [rbx + 0xf8], 0
test r10d, r10d
mov qword [rbx + 0x108], rbx
mov qword [rbx + 0x110], 0
je 0x4029b0
mov r8, qword [rbx + 0x128]
mov rcx, rbx
add rbx, 0x128
mov rdx, qword [rbx - 0x128]
call fcn.00406520
mov rax, qword [rsi + 0x10]
cmp rax, rbx
ja 0x4029c4
mov rbx, qword [rsi + 8]
cmp rax, rbx
ja 0x402aa0
jmp 0x4035d6
mov rdx, qword [rsi + 0x10]
add rbx, 0x128
cmp rdx, rbx
jbe 0x402ac4
mov r9d, dword [rbx + 0xdc]
test r9d, r9d
jne 0x402a90
mov rcx, rbx
add rbx, 0x128
call fcn.00403650
mov rdx, qword [rsi + 0x10]
cmp rdx, rbx
ja 0x402aa0
mov dword [0x00519420], 0
mov rax, qword [rsi + 8]
cmp rdx, rax
jbe 0x402b1b
xor r8d, r8d
xor ecx, ecx
jmp 0x402aeb
add rax, 0x128
cmp rdx, rax
jbe 0x402b12
cmp qword [rax + 0x108], rax
jne 0x402ae0
cmp qword [rax + 0x110], 0
je 0x402ae0
add rax, 0x128
add ecx, 1
mov r8d, 1
cmp rdx, rax
ja 0x402aeb
test r8b, r8b
jne 0x40362e
mov ecx, 0x128
call fcn.004be5f0
mov r12, qword [rsi + 8]
cmp r12, qword [rsi + 0x10]
mov r14, rax
mov qword [0x00519410], rax
mov rbp, qword [0x00506000]
jae 0x402c44
xor r15d, r15d
mov rbp, qword [0x00506000]
movabs rdi, 0x100000000
jmp 0x402b71
add r12, 0x128
cmp r12, qword [rsi + 0x10]
jae 0x402c44
mov rbx, qword [r12 + 0x108]
cmp rbx, r12
jne 0x402b60
cmp qword [r12 + 0x110], 0
je 0x402b60
lea r13, [r14 + 0x128]
add r15d, 1
mov rcx, r13
call fcn.00409cd0
test byte [rbp], 4
mov qword [r14 + 0x204], rdi
mov dword [r14 + 0x228], r15d
mov qword [r14 + 0x230], r13
mov qword [r14 + 0x238], r12
jne 0x40353c
mov rax, rbx
mov dword [rax + 0x100], r15d
mov qword [rax + 0x108], r13
mov rax, qword [rax + 0x110]
test rax, rax
jne 0x402bc5
nop
mov rax, qword [rbx + 0x118]
test rax, rax
jne 0x402c00
jmp 0x402c24
add dword [r14 + 0x150], ecx
mov rax, qword [rax + 0x28]
test rax, rax
je 0x402c24
mov rdx, qword [rax]
cmp rdx, rbx
je 0x402bf7
cmp r15d, dword [rdx + 0x100]
mov ecx, dword [rax + 0x10]
jne 0x402bf0
mov rax, qword [rax + 0x28]
add dword [r14 + 0x1f0], ecx
test rax, rax
jne 0x402c00
mov rbx, qword [rbx + 0x110]
test rbx, rbx
jne 0x402be0
add r12, 0x128
cmp r12, qword [rsi + 0x10]
mov r14, r13
jb 0x402b71
mov ecx, dword [rsi]
shl rcx, 3
call fcn.004be5f0
mov r9d, dword [rsi]
mov r12, rax
test r9d, r9d
je 0x4035cf
mov rcx, qword [rsi + 8]
mov rdx, rax
lea eax, [r9 - 1]
lea r8, [rax + rax*8]
lea r8, [rax + r8*4]
lea rax, [rcx + 0x128]
lea r8, [rax + r8*8]
jmp 0x402c86
add rax, 0x128
mov qword [rdx], rcx
add rdx, 8
cmp r8, rax
mov rcx, rax
jne 0x402c80
mov edx, r9d
lea r9, [0x00402660]
mov r8d, 8
mov rcx, r12
call sub.msvcrt.dll_qsort
test byte [rbp], 2
jne 0x403564
mov ebx, dword [rsi]
mov edi, ebx
sub edi, 1
js 0x402eb4
mov rax, qword [0x005062b0]
movsxd rdi, edi
xor r15d, r15d
pxor xmm6, xmm6
mov r13, qword [0x00506270]
movsd xmm7, qword [0x004c94f0]
mov qword [rsp + 0x38], rax
nop dword [rax]
mov r14, qword [r12 + rdi*8]
mov r11d, dword [rbp]
mov rbx, qword [r14 + 0x108]
and r11d, 0x400
cmp rbx, r15
je 0x403220
cmp r14, rbx
je 0x4033e0
mov r15, qword [rbx + 0x110]
mov dword [rbx + 0xe0], 0
mov qword [rbx + 0xe8], 0
test r15, r15
je 0x402dfd
mov r10, r15
xor r8d, r8d
pxor xmm2, xmm2
nop word [rax + rax]
mov rax, qword [r10 + 0x118]
test rax, rax
je 0x402db8
nop dword [rax]
mov rcx, qword [rax]
cmp rbx, qword [rcx + 0x108]
je 0x402daf
mov edx, dword [rbx + 0x28]
or r8d, dword [rcx + 0xe0]
test edx, edx
mov dword [rbx + 0xe0], r8d
je 0x402daf
mov r9d, dword [rax + 0x10]
pxor xmm0, xmm0
pxor xmm1, xmm1
cvtsi2sd xmm1, rdx
cvtsi2sd xmm0, r9
divsd xmm0, xmm1
mulsd xmm0, qword [rcx + 0xe8]
addsd xmm2, xmm0
movsd qword [rbx + 0xe8], xmm2
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x402d60
mov r10, qword [r10 + 0x110]
test r10, r10
jne 0x402d50
mov rax, rbx
jmp 0x402de9
mov rax, r15
mov r8d, dword [rbx + 0xe0]
mov r15, qword [r15 + 0x110]
movsd xmm2, qword [rbx + 0xe8]
test r15, r15
mov dword [rax + 0xe0], r8d
movsd qword [rax + 0xe8], xmm2
jne 0x402dd0
test r11d, r11d
jne 0x40322c
mov r8d, dword [r14 + 0xe0]
mov rdx, qword [r14]
test r8d, r8d
jne 0x403200
mov rcx, qword [rsp + 0x38]
call fcn.0040a200
test rax, rax
je 0x4034b0
mov rdx, qword [r14]
mov r15, rbx
mov dword [r14 + 0xe0], 1
mov rax, qword [0x005062b0]
ucomisd xmm6, qword [r14 + 0xe8]
lea rcx, [rax + 0x90]
jp 0x4031e4
jne 0x4031e4
call fcn.0040a200
test rax, rax
je 0x403470
movsd qword [r14 + 0xe8], xmm7
movapd xmm0, xmm7
mulsd xmm0, qword [r14 + 0xb8]
test dword [rbp], 0x400
movsd qword [r14 + 0xf0], xmm0
addsd xmm0, qword [r13]
movsd qword [r13], xmm0
jne 0x4032b0
sub rdi, 1
test edi, edi
jns 0x402cf0
mov ebx, dword [rsi]
mov eax, dword [0x00519420]
mov rcx, qword [0x00519410]
lea r8, [rax + rax*8]
mov rdi, rax
lea rax, [rax + r8*4]
lea rdx, [rcx + 0x128]
lea rcx, [rcx + rax*8]
cmp rdx, rcx
ja 0x402f35
pxor xmm1, xmm1
mov rax, qword [rdx + 0x110]
movsd xmm0, qword [rdx + 0xb8]
test rax, rax
je 0x402f1c
ucomisd xmm1, qword [rax + 0xe8]
jp 0x402f00
je 0x402f10
addsd xmm0, qword [rax + 0xb8]
movsd qword [rdx + 0xb8], xmm0
mov rax, qword [rax + 0x110]
test rax, rax
jne 0x402ef4
mulsd xmm0, qword [rdx + 0xe8]
add rdx, 0x128
movsd qword [rdx - 0x38], xmm0
cmp rdx, rcx
jbe 0x402ee0
test ebx, ebx
je 0x4030d2
mov rax, qword [fcn.004c1900]
xor r13d, r13d
pxor xmm6, xmm6
mov qword [rsp + 0x38], rax
mov eax, r13d
mov r14, qword [r12 + rax*8]
ucomisd xmm6, qword [r14 + 0xe8]
jp 0x402f68
je 0x4030bd
mov rbx, qword [r14 + 0x120]
test rbx, rbx
je 0x4030bd
nop dword [rax + rax]
mov eax, dword [rbx + 0x10]
mov rdi, qword [rbx + 8]
test eax, eax
je 0x4030b0
cmp r14, rdi
je 0x4030b0
ucomisd xmm6, qword [rdi + 0xe8]
jp 0x402fa8
je 0x4030b0
mov r15, qword [rdi + 0x108]
cmp rdi, r15
je 0x403270
mov eax, dword [rdi + 0x100]
cmp dword [r14 + 0x100], eax
je 0x4030b0
mov eax, dword [rdi + 0xdc]
cmp dword [r14 + 0xdc], eax
jle 0x403330
mov edx, dword [r15 + 0x28]
test edx, edx
je 0x4030b0
mov eax, dword [rbx + 0x10]
pxor xmm1, xmm1
pxor xmm0, xmm0
cvtsi2sd xmm0, rdx
movsd xmm2, qword [r15 + 0xb8]
movsd xmm4, qword [r14 + 0xf8]
cvtsi2sd xmm1, rax
mov rax, qword [r14 + 0x108]
divsd xmm1, xmm0
cmp r14, rax
movsd xmm0, qword [r14 + 0xd0]
mulsd xmm2, xmm1
mulsd xmm1, qword [r15 + 0xd0]
movapd xmm7, xmm2
addsd xmm7, xmm1
addsd xmm0, xmm7
movapd xmm3, xmm7
movsd qword [r14 + 0xd0], xmm0
movsd xmm0, qword [r14 + 0xe8]
mulsd xmm3, xmm0
mulsd xmm2, xmm0
mulsd xmm0, xmm1
addsd xmm4, xmm3
movsd qword [r14 + 0xf8], xmm4
movsd qword [rbx + 0x18], xmm2
movsd qword [rbx + 0x20], xmm0
je 0x4030a0
movsd xmm0, qword [rax + 0xd0]
addsd xmm3, qword [rax + 0xf8]
addsd xmm0, xmm7
movsd qword [rax + 0xf8], xmm3
movsd qword [rax + 0xd0], xmm0
test dword [rbp], 0x400
jne 0x403362
nop dword [rax]
mov rbx, qword [rbx + 0x30]
test rbx, rbx
jne 0x402f80
mov ebx, dword [rsi]
add r13d, 1
cmp ebx, r13d
ja 0x402f50
mov edi, dword [0x00519420]
mov rcx, r12
call sub.msvcrt.dll_free
lea ecx, [rbx + rdi]
shl rcx, 3
call fcn.004be5f0
mov edi, dword [rsi]
mov rbx, rax
test edi, edi
je 0x4035e5
mov r8, qword [rsi + 8]
mov rcx, rax
lea eax, [rdi - 1]
lea rdx, [rax + rax*8]
lea rax, [rax + rdx*4]
lea rdx, [r8 + 0x128]
lea rax, [rdx + rax*8]
jmp 0x403119
add rdx, 0x128
mov qword [rcx], r8
add rcx, 8
cmp rax, rdx
mov r8, rdx
jne 0x403112
mov edx, edi
mov r9d, dword [0x00519420]
test r9d, r9d
je 0x403172
mov r11, qword [0x00519410]
lea r10d, [rdi - 1]
mov edx, 1
nop word cs:[rax + rax]
lea ecx, [rdx + r10]
mov eax, edx
add edx, 1
lea r8, [rax + rax*8]
cmp edx, r9d
lea rax, [rax + r8*4]
lea rax, [r11 + rax*8]
mov qword [rbx + rcx*8], rax
jbe 0x403150
lea edx, [rdi + r9]
lea r9, [0x00402680]
mov r8d, 8
mov rcx, rbx
call sub.msvcrt.dll_qsort
mov eax, dword [0x00519420]
add eax, dword [rsi]
je 0x4031b5
mov rcx, rbx
xor edx, edx
nop word cs:[rax + rax]
mov r8, qword [rcx]
add edx, 1
add rcx, 8
cmp edx, eax
mov dword [r8 + 0xd8], edx
jne 0x4031a0
movaps xmm6, xmmword [rsp + 0x40]
mov rax, rbx
movaps xmm7, xmmword [rsp + 0x50]
add rsp, 0x68
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
pop r13
pop r14
pop r15
ret
mov eax, dword [rax + 0x10]
sub dword [rbx + 0x28], eax
mov dword [rbx + 0xc8], eax
jmp 0x4029f3
call fcn.0040a200
test rax, rax
je 0x403509
movsd xmm0, qword [r14 + 0xe8]
jmp 0x402e7b
mov rcx, qword [0x005062b0]
call fcn.0040a200
mov rdx, qword [r14]
test rax, rax
je 0x4034e1
mov r15, rbx
jmp 0x402e3d
test r11d, r11d
mov rbx, r15
je 0x402e06
lea rcx, str._prop_flags_
call sub.msvcrt.dll_printf
mov rcx, r14
call fcn.0040ad30
mov edx, dword [r14 + 0xe0]
lea rcx, str.inherits_print_flag__d_and_prop_fract__f_n
movsd xmm0, qword [r14 + 0xe8]
movapd xmm2, xmm0
movq r8, xmm0
call sub.msvcrt.dll_printf
jmp 0x402e06
mov eax, dword [rdi + 0xdc]
cmp dword [r14 + 0xdc], eax
jg 0x402fde
mov ecx, 2
call qword [fcn.004c1900]
mov r8d, 0x1d
mov edx, 1
lea rcx, str._propagate__toporder_botches_n
mov r9, rax
call sub.msvcrt.dll_fwrite
jmp 0x4030b0
lea rcx, str._prop_flags_
call sub.msvcrt.dll_printf
mov rcx, r14
call fcn.0040ad30
mov edx, dword [r14 + 0xe0]
lea rcx, str._ends_up_with_printflag__d_and_prop_fract__f_n
movsd xmm0, qword [r14 + 0xe8]
movapd xmm2, xmm0
movq r8, xmm0
call sub.msvcrt.dll_printf
movsd xmm2, qword [r13]
lea rcx, str._prop_flags__time__f_propself__f_print_time__f_n
movsd xmm1, qword [r14 + 0xf0]
movsd xmm0, qword [r14 + 0xb8]
movapd xmm3, xmm2
movq r9, xmm2
movq r8, xmm1
movapd xmm2, xmm1
movq rdx, xmm0
movapd xmm1, xmm0
call sub.msvcrt.dll_printf
jmp 0x402ea6
mov ecx, 2
mov rax, qword [rsp + 0x38]
call rax
mov r8d, 0x1d
mov edx, 1
lea rcx, str._propagate__toporder_botches_n
mov r9, rax
call sub.msvcrt.dll_fwrite
mov r15, qword [rdi + 0x108]
jmp 0x402fde
lea rcx, str._prop_time__child__t
call sub.msvcrt.dll_printf
mov rcx, r15
call fcn.0040ad30
mov eax, dword [r15 + 0x28]
lea rcx, str._with__f__f__lu__lu_n
mov r9d, dword [rbx + 0x10]
movsd xmm0, qword [r15 + 0xb8]
movsd xmm1, qword [r15 + 0xd0]
movq rdx, xmm0
mov dword [rsp + 0x20], eax
movapd xmm2, xmm1
movq r8, xmm1
movapd xmm1, xmm0
call sub.msvcrt.dll_printf
lea rcx, str._prop_time__parent_t
call sub.msvcrt.dll_printf
mov rcx, r14
call fcn.0040ad30
movapd xmm1, xmm7
movq rdx, xmm7
lea rcx, str._n_prop_time__share__f_n
call sub.msvcrt.dll_printf
jmp 0x4030b0
mov rax, qword [r14 + 0x118]
mov dword [r14 + 0xe0], 0
mov qword [r14 + 0xe8], 0
test rax, rax
je 0x4035ec
nop word cs:[rax + rax]
mov rcx, qword [rax]
cmp r14, rcx
je 0x403461
mov r8d, dword [r14 + 0x28]
mov edx, dword [rcx + 0xe0]
or dword [r14 + 0xe0], edx
test r8d, r8d
je 0x403461
mov edx, dword [rax + 0x10]
pxor xmm0, xmm0
pxor xmm1, xmm1
cvtsi2sd xmm1, r8
cvtsi2sd xmm0, rdx
divsd xmm0, xmm1
mulsd xmm0, qword [rcx + 0xe8]
addsd xmm0, qword [r14 + 0xe8]
movsd qword [r14 + 0xe8], xmm0
mov rax, qword [rax + 0x28]
test rax, rax
jne 0x403410
jmp 0x402dfd
mov rax, qword [0x005062b0]
mov edx, dword [rax + 0x90]
test edx, edx
jne 0x4031f2
mov rax, qword [0x005062b0]
mov rdx, qword [r14]
lea rcx, [rax + 0xa8]
call fcn.0040a200
test rax, rax
jne 0x4031f2
jmp 0x402e6e
mov rax, qword [0x005062b0]
mov r15, rbx
mov rdx, qword [r14]
mov ecx, dword [rax]
test ecx, ecx
jne 0x402e3d
lea rcx, [rax + 0x18]
call fcn.0040a200
test rax, rax
je 0x402e2c
mov rdx, qword [r14]
jmp 0x402e3d
mov rax, qword [0x005062b0]
lea rcx, [rax + 0x18]
call fcn.0040a200
test rax, rax
je 0x403501
mov dword [r14 + 0xe0], 0
mov rdx, qword [r14]
jmp 0x403218
mov rax, qword [0x005062b0]
mov rdx, qword [r14]
lea rcx, [rax + 0xa8]
call fcn.0040a200
test rax, rax
je 0x4031f2
mov qword [r14 + 0xe8], 0
pxor xmm0, xmm0
jmp 0x402e7b
lea rcx, str._cycle_link_
call sub.msvcrt.dll_printf
mov rcx, r12
call fcn.0040ad30
lea rcx, str._is_the_head_of_cycle__d_n
mov edx, r15d
call sub.msvcrt.dll_printf
jmp 0x402bc2
lea rcx, str._cg_assemble__topological_sort_listing
call sub.msvcrt.dll_puts
mov ebx, dword [rsi]
test ebx, ebx
je 0x4035fd
lea r14, str._cg_assemble_
xor edi, edi
lea r13, [0x004c93d6]
nop word [rax + rax]
mov rcx, r14
call sub.msvcrt.dll_printf
mov eax, edi
mov rcx, r13
add edi, 1
lea rbx, [r12 + rax*8]
mov rax, qword [rbx]
mov edx, dword [rax + 0xdc]
call sub.msvcrt.dll_printf
mov rcx, qword [rbx]
call fcn.0040ad30
mov ecx, 0xa
call fcn.004c16a8
mov ebx, dword [rsi]
cmp ebx, edi
ja 0x403590
jmp 0x402cb9
xor edx, edx
jmp 0x402c98
mov dword [0x00519420], 0
jmp 0x402b1b
xor edx, edx
jmp 0x40312a
test r11d, r11d
jne 0x40322c
mov rdx, qword [r14]
jmp 0x402e19
mov eax, dword [0x00519420]
mov rcx, qword [0x00519410]
lea r8, [rax + rax*8]
mov rdi, rax
lea rax, [rax + r8*4]
lea rdx, [rcx + 0x128]
lea rcx, [rcx + rax*8]
cmp rcx, rdx
jae 0x402edc
jmp 0x4030d2
mov dword [0x00519420], ecx
add ecx, 1
imul rcx, rcx, 0x128
jmp 0x402b20