Function at 0x4023e0
Capabilities:
Check os version
Write file on windows

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x5c8
mov rdi, r8
mov rbx, rdx
mov rsi, rcx
mov rcx, qword [0x0047c010]
test rcx, rcx
je 0x402420
call sub.KERNEL32.dll_RemoveVectoredExceptionHandler
test eax, eax
je 0x402904
mov qword [0x0047c010], 0
mov eax, dword [section..data]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov rax, qword [rax + 8]
test rax, rax
je 0x4024f3
cmp rax, 1
jne 0x402922
mov eax, dword [section..data]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 8], 2
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov rsi, qword [rax + 0x30]
xor ebx, ebx
lea r14, str.Panicked_during_a_panic._Aborting._n
lea rdi, [rsp + 0xf0]
nop word cs:[rax + rax]
nop dword [rax + rax]
cmp rbx, 0x23
ja 0x4028e1
lea rdx, [r14 + rbx]
mov dword [rsp + 0xf0], 0xaaaaaaaa
mov r8d, 0x23
sub r8d, ebx
mov qword [rsp + 0x20], 0
mov rcx, rsi
mov r9, rdi
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4028f5
mov eax, dword [rsp + 0xf0]
add rbx, rax
cmp rbx, 0x23
jne 0x4024a0
jmp 0x402922
mov eax, dword [section..data]
mov rcx, qword gs:[0x58]
mov rax, qword [rcx + rax*8]
mov qword [rax + 8], 1
lock add byte [0x0047c098], 1
lea rcx, [0x0047c0a0]
call sub.KERNEL32.dll_AcquireSRWLockExclusive
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov r13, qword [rax + 0x30]
call sub.KERNEL32.dll_GetCurrentThreadId
mov r14d, eax
mov qword [rsp + 0x28], r13
lea rax, [rsp + 0x28]
mov qword [rsp + 0x80], rax
lea rax, [fcn.00402260]
mov qword [rsp + 0x88], rax
xor r12d, r12d
lea rbp, str.thread__panic:
lea r15, [rsp + 0xf0]
nop word cs:[rax + rax]
nop
cmp r12, 7
ja 0x4028e1
lea rdx, [r12 + rbp]
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0xf0], 0xaaaaaaaa
mov r8d, r12d
xor r8d, 7
mov qword [rsp + 0x20], 0
mov r9, r15
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4028f5
mov eax, dword [rsp + 0xf0]
add r12, rax
cmp r12, 7
jne 0x402580
movaps xmm0, xmmword [0x00444020]
movaps xmmword [rsp + 0x100], xmm0
movaps xmmword [rsp + 0xf0], xmm0
mov byte [rsp + 0x110], 0xaa
mov r8d, 0x21
cmp r14d, 0x64
jb 0x4026eb
mov eax, r14d
imul rdx, rax, 0x51eb851f
shr rdx, 0x25
imul ecx, edx, 0x64
mov r8d, r14d
sub r8d, ecx
lea rcx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx r8d, word [rcx + r8*2]
mov word [rsp + 0x10f], r8w
mov r8d, 0x1f
cmp r14d, 0x270f
jbe 0x4026e8
mov r8d, edx
imul r8, r8, 0x28f5c29
shr r8, 0x20
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, word [rcx + rdx*2]
mov word [rsp + 0x10d], dx
mov edx, 0xd1b71759
imul rdx, rax
shr rdx, 0x2d
mov r8d, 0x1d
cmp r14d, 0xf4240
jb 0x4026e8
mov r8d, edx
imul r8, r8, 0x28f5c29
shr r8, 0x20
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, word [rcx + rdx*2]
mov word [rsp + 0x10b], dx
imul rdx, rax, 0x431bde83
shr rdx, 0x32
mov r8d, 0x1b
cmp r14d, 0x5f5e100
jb 0x4026e8
imul r8d, edx, 0x147b
shr r8d, 0x13
imul r8d, r8d, 0x64
sub edx, r8d
movzx edx, dx
movzx ecx, word [rcx + rdx*2]
mov word [rsp + 0x109], cx
imul r14, rax, 0x55e63b89
shr r14, 0x39
mov r8d, 0x19
jmp 0x4026eb
mov r14d, edx
cmp r14d, 0xa
jae 0x402703
or r14b, 0x30
mov byte [rsp + r8 + 0xef], r14b
add r8, 0xffffffffffffffff
jmp 0x40271e
mov eax, r14d
lea rcx, str.00010203040506070809101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899
movzx eax, word [rcx + rax*2]
mov word [rsp + r8 + 0xee], ax
add r8, 0xfffffffffffffffe
mov edx, 0x21
sub rdx, r8
lea rcx, [rsp + r8]
add rcx, 0xf0
lea r8, [0x00476690]
lea r9, [rsp + 0x80]
call fcn.00422a70
test ax, ax
jne 0x402918
xor r15d, r15d
lea r14, [rsp + 0xf0]
nop dword [rax]
cmp r15, 8
ja 0x4028e1
lea rdx, [r15 + rbp]
add rdx, 9
mov rcx, qword [rsp + 0x28]
mov dword [rsp + 0xf0], 0xaaaaaaaa
mov r8d, 8
sub r8d, r15d
mov qword [rsp + 0x20], 0
mov r9, r14
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4028f5
mov eax, dword [rsp + 0xf0]
add r15, rax
cmp r15, 8
jne 0x402760
mov qword [rsp + 0x48], r13
lea rax, [rsp + 0x48]
mov qword [rsp + 0x90], rax
lea r15, [fcn.00402260]
mov qword [rsp + 0x98], r15
lea r8, [0x00476690]
lea r9, [rsp + 0x90]
mov rcx, rbx
mov rdx, rdi
call fcn.00422a70
test ax, ax
jne 0x402918
xor eax, eax
lea rdi, [0x00445067]
lea rbx, [rsp + 0xf0]
test eax, eax
jne 0x40284d
nop dword [rax]
mov rcx, qword [rsp + 0x48]
mov dword [rsp + 0xf0], 0xaaaaaaaa
mov qword [rsp + 0x20], 0
mov rdx, rdi
mov r8d, 1
mov r9, rbx
call sub.KERNEL32.dll_WriteFile
test eax, eax
je 0x4028f5
mov eax, dword [rsp + 0xf0]
test eax, eax
je 0x402810
cmp eax, 1
jne 0x4028e1
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov r14, qword [rax + 0x30]
mov qword [rsp + 0x70], r14
cmp byte [0x0047c0f8], 0
jne 0x4029d1
cmp byte [0x0047c110], 0
jne 0x402927
movups xmm0, xmmword [0x004461c0]
movaps xmmword [rsp + 0xf0], xmm0
xorps xmm1, xmm1
movaps xmmword [rsp + 0x100], xmm1
movups xmmword [0x0047c118], xmm0
movups xmmword [0x0047c128], xmm1
lea rax, [0x0047c118]
mov qword [0x0047c100], rax
lea rcx, [0x004464f8]
mov qword [0x0047c108], rcx
mov byte [0x0047c110], 1
mov qword [rsp + 0x30], rax
mov qword [rsp + 0x38], rcx
jmp 0x402933
lea rcx, str.start_index_is_larger_than_end_index
mov edx, 0x24
xor r9d, r9d
call fcn.00402230
call sub.KERNEL32.dll_GetLastError
movzx eax, ax
cmp eax, 0x3e5
jne 0x402922
lea rcx, str.reached_unreachable_code
mov edx, 0x18
xor r9d, r9d
call fcn.00402230
cmp ax, 0x10
jae 0x402bcc
call fcn.00402c70
movups xmm0, xmmword [0x0047c100]
movaps xmmword [rsp + 0x30], xmm0
lea rcx, [rsp + 0xf0]
lea rdx, [rsp + 0x30]
call fcn.00402f60
movsx rax, word [rsp + 0x140]
test rax, rax
jne 0x402ac7
movups xmm0, xmmword [rsp + 0x130]
movaps xmmword [rsp + 0xe0], xmm0
movups xmm1, xmmword [rsp + 0xf0]
movups xmm2, xmmword [rsp + 0x100]
movups xmm3, xmmword [rsp + 0x110]
movups xmm4, xmmword [rsp + 0x120]
movaps xmmword [rsp + 0xd0], xmm4
movaps xmmword [rsp + 0xc0], xmm3
movaps xmmword [rsp + 0xb0], xmm2
movaps xmmword [rsp + 0xa0], xmm1
movups xmmword [0x0047c0a8], xmm1
movups xmmword [0x0047c0b8], xmm2
movups xmmword [0x0047c0c8], xmm3
movups xmmword [0x0047c0d8], xmm4
movups xmmword [0x0047c0e8], xmm0
mov byte [0x0047c0f8], 1
mov rax, qword gs:[0x30]
mov rax, qword [rax + 0x60]
mov rax, qword [rax + 0x20]
mov rax, qword [rax + 0x30]
mov qword [rsp + 0x78], rax
lea rdi, [rsp + 0xa0]
lea rdx, [rsp + 0x78]
mov rcx, rdi
call fcn.0041ce40
lea rbx, [rsp + 0xf0]
mov r8d, 0x4d0
mov rcx, rbx
xor edx, edx
call fcn.00440060
mov rcx, rbx
call sub.ntdll.dll_RtlCaptureContext
mov qword [rsp + 0x20], rsi
lea rdx, [0x0047c0a8]
lea rcx, [rsp + 0x70]
mov r8, rdi
mov r9, rbx
call fcn.0041cfc0
test ax, ax
je 0x402b5a
movsx rax, ax
shl rax, 4
lea rcx, [0x00476e88]
mov rsi, qword [rax + rcx]
mov rdi, qword [rax + rcx + 8]
mov qword [rsp + 0x30], r14
lea rax, [rsp + 0x30]
mov qword [rsp + 0x60], rax
mov qword [rsp + 0x68], r15
lea rdx, str.Unable_to_dump_stack_trace:_s_n
lea rcx, [rsp + 0x60]
mov r8d, 0x1c
call fcn.00402d70
test ax, ax
jne 0x402b54
lea r8, [0x00476690]
lea r9, [rsp + 0x60]
mov rcx, rsi
mov rdx, rdi
call fcn.00422a70
test ax, ax
jne 0x402b54
movups xmm0, xmmword [rsp + 0x60]
movaps xmmword [rsp + 0xf0], xmm0
lea rdx, [0x00446153]
jmp 0x402b41
shl rax, 4
lea rcx, [0x00476e88]
mov rsi, qword [rax + rcx]
mov rdi, qword [rax + rcx + 8]
mov qword [rsp + 0xa0], r14
lea rax, [rsp + 0xa0]
mov qword [rsp + 0x50], rax
mov qword [rsp + 0x58], r15
lea rdx, str.Unable_to_dump_stack_trace:_Unable_to_open_debug_info:_s_n
lea rcx, [rsp + 0x50]
mov r8d, 0x37
call fcn.00402d70
test ax, ax
jne 0x402b54
lea r8, [0x00476690]
lea r9, [rsp + 0x50]
mov rcx, rsi
mov rdx, rdi
call fcn.00422a70
test ax, ax
jne 0x402b54
movups xmm0, xmmword [rsp + 0x50]
movaps xmmword [rsp + 0xf0], xmm0
lea rdx, [0x00446132]
lea rcx, [rsp + 0xf0]
mov r8d, 1
call fcn.00402d70
cmp ax, 0x10
jae 0x402bcc
lea rcx, [0x0047c0a0]
call sub.KERNEL32.dll_ReleaseSRWLockExclusive
lock sub byte [0x0047c098], 1
je 0x402922
mov dword [rsp + 0xa0], 0
lea rsi, [rsp + 0xa0]
lea rdi, [rsp + 0xf0]
nop
mov dword [rsp + 0xf0], 0
mov r8d, 4
mov rcx, rsi
mov rdx, rdi
xor r9d, r9d
call sub.ntdll.dll_RtlWaitOnAddress
test eax, eax
je 0x402b90
cmp eax, 0x102
lea rcx, str.reached_unreachable_code
mov edx, 0x18
xor r9d, r9d
call fcn.00402230
lea rcx, str.invalid_error_code
mov edx, 0x12
xor r9d, r9d
call fcn.00402230
int3