Function at 0x1004089b0
Capabilities:
Write file on windows

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x1b0
mov eax, dword [rdx]
mov rdi, rcx
mov rbx, rdx
mov rsi, r8
cmp eax, 1
je 0x100408a28
cmp eax, 2
je 0x100408a08
test eax, eax
jne case.0x100408a20.1
movsxd rsi, dword [rbx + 0x10]
mov rcx, qword [rbx + 8]
mov edx, 1
mov r9, qword [rdi + 8]
mov r8, rsi
call fcn.100431b00
cmp rax, rsi
jb 0x100408a53
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
cmp byte [rdx + 4], 0x79
ja case.0x100408a20.1
movzx eax, byte [rdx + 4]
lea rdx, [0x100436824]
movsxd rax, dword [rdx + rax*4]
add rax, rdx
jmp rax
movsxd rsi, dword [rdx + 0x10]
mov rcx, qword [rdx + 8]
mov edx, 1
mov r9, qword [rdi + 8]
mov r8, rsi
call fcn.100431b00
cmp rax, rsi
jb 0x100408a78
mov rcx, qword [rdi + 8]
call sub.msys_2.0.dll_fflush
test eax, eax
je case.0x100408a20.1
mov rbx, qword [rdi + 0x10]
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.100407e00
mov rbx, qword [rdi + 0x10]
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
call fcn.100407e00
jmp 0x100408a46
mov ecx, dword [r9 + 0x18]
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], 1
mov r9d, 1
xor r8d, r8d
call fcn.100413ac0
mov r8, rax
mov rdx, qword [rbx + 8]
mov rcx, rdi
call fcn.1004080d0
jmp case.0x100408a20.1
mov ecx, dword [r9 + 0x1c]
mov qword [rsp + 0x38], r9
call sub.msys_2.0.dll_getgrgid
mov r9, qword [rsp + 0x38]
test rax, rax
jne 0x100408ccd
mov ecx, dword [r9 + 0x1c]
lea rdx, [rsp + 0x50]
jmp 0x100408a96
mov rdx, qword [0x10044c4a0]
lea rax, [0x1004367cb]
mov ecx, dword [rdx]
test ecx, ecx
jle 0x100408b0e
movsxd rax, dword [rdx + 0x1c]
xor edx, edx
add rax, r8
cmp byte [rax], 0x2f
sete dl
add rax, rdx
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x20], rax
mov r9, qword [rbx + 8]
movzx r8d, byte [rdi + 0x18]
call fcn.10040f770
test eax, eax
jns case.0x100408a20.1
jmp 0x100408a53
lea rsi, [rsp + 0x50]
mov rcx, r9
mov rdx, rsi
call fcn.1004106d0
mov rdx, qword [rbx + 8]
mov r8, rsi
mov rcx, rdi
mov byte [rsp + 0x5a], 0
call fcn.1004080d0
jmp case.0x100408a20.1
mov rax, qword [r9 + 0x28]
mov rdx, qword [r9 + 0x68]
test rax, rax
jne 0x100409032
mov r8, qword [0x100436e78]
test rdx, rdx
je 0x100408b8c
mov r8, qword [0x100436e80]
jns 0x100408b8c
mov r8, qword [0x100436e88]
mov rdx, qword [rbx + 8]
movq xmm2, r8
mov rcx, rdi
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1004080d0
mov r12, qword [0x10044c4a0]
mov eax, dword [r12 + 0x1c]
lea ecx, [rax + 1]
movsxd rcx, ecx
call fcn.10042b0c0
movsxd r12, dword [r12 + 0x1c]
mov rdx, rsi
mov rbp, rax
mov rcx, rax
mov r8, r12
call sub.msys_2.0.dll_memcpy
mov rdx, qword [rbx + 8]
mov r8, rbp
mov rcx, rdi
mov byte [rbp + r12], 0
call fcn.1004080d0
mov rcx, rbp
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.100410780
mov rdx, r8
mov rcx, r9
call fcn.100409af0
jmp 0x100408b0e
mov ecx, dword [r9]
lea rdx, [rsp + 0x50]
jmp 0x100408a96
mov eax, dword [r9 + 0x10]
lea r8, str.fdlsbUcp.NL_
and eax, 0xf000
cmp eax, 0x8000
je 0x100408c98
lea r8, [0x1004367ce]
cmp eax, 0x4000
je 0x100408c98
lea r8, [0x1004367d0]
cmp eax, 0xa000
je 0x100408c98
lea r8, [0x1004367d2]
cmp eax, 0xc000
je 0x100408c98
lea r8, [0x1004367d4]
cmp eax, 0x6000
je 0x100408c98
lea r8, [0x1004367d8]
cmp eax, 0x2000
je 0x100408c98
cmp eax, 0x1000
lea r8, [0x1004367da]
lea rax, [0x1004367d6]
cmovne r8, rax
nop word [rax + rax]
mov rdx, qword [rbx + 8]
mov rcx, rdi
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1004080d0
mov ecx, dword [r9 + 0x18]
mov qword [rsp + 0x38], r9
call sub.msys_2.0.dll_getpwuid
mov r9, qword [rsp + 0x38]
test rax, rax
je case.0x100408a20.85
movsxd rdx, dword [rbx + 0x10]
mov rcx, qword [rbx + 8]
mov byte [rcx + rdx], 0x73
mov rdx, qword [rbx + 8]
mov r8, qword [rax]
jmp 0x100408c9c
movdqu xmm5, xmmword [r9 + 0x40]
movaps xmmword [rsp + 0x40], xmm5
lea rcx, [rsp + 0x40]
call 0x100408770
mov r8, rax
jmp 0x100408c98
mov rcx, qword [r9 + 0x28]
lea rdx, [rsp + 0x50]
jmp 0x100408a96
mov rdx, qword [rcx + 0x20]
mov rcx, qword [rcx + 8]
mov qword [rsp + 0x20], r8
jmp 0x100408b1b
movzx ecx, word [r9 + 0x14]
lea rdx, [rsp + 0x50]
jmp 0x100408a96
mov r8d, dword [r9 + 0x10]
mov rdx, qword [rbx + 8]
and r8d, 0xfff
mov rcx, rdi
add rsp, 0x1b0
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
jmp fcn.1004080d0
mov eax, dword [r9 + 0x10]
and eax, 0xf000
cmp eax, 0xa000
je 0x100408fd5
lea rax, [0x1004367cb]
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x20], rax
mov r9, qword [rbx + 8]
movzx r8d, byte [rdi + 0x18]
call fcn.10040f770
test eax, eax
js 0x100408f70
xor ebp, ebp
jmp 0x100408bec
mov rcx, qword [r9 + 0x68]
lea rdx, [rsp + 0x50]
mov r9d, 0x400
mov qword [rsp + 0x20], 0x400
jmp 0x100408aa5
mov rcx, qword [r9 + 8]
lea rdx, [rsp + 0x50]
jmp 0x100408a96
mov rcx, r8
call fcn.10042b550
mov rcx, rax
mov rsi, rax
call sub.msys_2.0.dll_strlen
lea rax, [rsi + rax - 1]
cmp rax, rsi
jae 0x100408df1
jmp 0x100408e05
sub rax, 1
cmp rax, rsi
jb 0x100408e05
cmp byte [rax], 0x2f
je 0x100408de8
cmp rsi, rax
jae 0x100408e05
cmp byte [rax + 1], 0x2f
jne 0x100408e05
mov byte [rax + 1], 0
mov edx, 0x2f
mov rcx, rsi
call sub.msys_2.0.dll_strrchr
mov r9, qword [rbx + 8]
movzx r8d, byte [rdi + 0x18]
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 8]
test rax, rax
je 0x1004090e4
mov byte [rax], 0
mov qword [rsp + 0x20], rsi
call fcn.10040f770
test eax, eax
js 0x100408e6f
mov rcx, rsi
jmp 0x100408bef
mov rcx, r8
call fcn.1004102f0
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x20], rax
mov r9, qword [rbx + 8]
mov rsi, rax
movzx r8d, byte [rdi + 0x18]
call fcn.10040f770
test eax, eax
jns 0x100408e3d
mov rbx, qword [rdi + 0x10]
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
call fcn.100407e00
jmp 0x100408e3d
mov rcx, qword [r9 + 0x68]
lea rdx, [rsp + 0x50]
mov r9d, 0x400
mov qword [rsp + 0x20], 0x200
jmp 0x100408aa5
movdqu xmm3, xmmword [r9 + 0x30]
movaps xmmword [rsp + 0x40], xmm3
jmp 0x100408ced
mov rax, qword [0x10044c4a0]
mov rdx, qword [rbx + 8]
mov r8d, dword [rax]
jmp 0x100408d3a
movdqu xmm4, xmmword [r9 + 0x50]
movaps xmmword [rsp + 0x40], xmm4
jmp 0x100408ced
mov rbp, qword [0x10044c4a0]
mov rax, qword [0x10044c2e0]
lea r8, [rsp + 0x50]
mov rdx, qword [rbp + 0x10]
mov ecx, dword [rbp + 0x18]
call qword [rax + 0x60]
mov rdx, qword [rbx + 8]
test eax, eax
js 0x100408f8a
mov r8, qword [rsp + 0x50]
mov rcx, rdi
call fcn.1004080d0
jmp case.0x100408a20.1
mov eax, dword [r9 + 0x10]
and eax, 0xf000
cmp eax, 0xa000
je 0x10040905a
lea r8, str.fdlsbUcp.NL_
cmp eax, 0x8000
je 0x100408c98
lea r8, [0x1004367ce]
cmp eax, 0x4000
jne 0x100408c51
jmp 0x100408c98
lea rcx, str.error:__s_at_end_of_format_string
call sub.msys_intl_8.dll_libintl_gettext
lea r9, [0x100436822]
xor edx, edx
mov ecx, 1
mov r8, rax
call sub.msys_2.0.dll_error
nop
mov rbx, qword [rdi + 0x10]
xor ebp, ebp
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
call fcn.100407e00
jmp 0x100408bec
lea r8, [0x1004367cb]
mov rcx, rdi
call fcn.1004080d0
mov rdx, rsi
xor ecx, ecx
call fcn.100407d90
lea rcx, str.getfilecon_failed:__s
mov rsi, rax
call sub.msys_intl_8.dll_libintl_gettext
mov rbx, rax
call sub.msys_2.0.dll___errno
mov r9, rsi
mov r8, rbx
xor ecx, ecx
mov edx, dword [rax]
call sub.msys_2.0.dll_error
mov dword [rbp + 0x24], 1
jmp case.0x100408a20.1
mov r12, qword [0x10044c4a0]
mov rdx, qword [r12 + 0x10]
mov ecx, dword [r12 + 0x18]
call fcn.10040fdf0
mov rbp, rax
test rax, rax
je 0x1004091be
mov rdx, qword [rdi + 0x20]
mov rcx, qword [rdi + 8]
mov qword [rsp + 0x20], rax
mov r9, qword [rbx + 8]
movzx r8d, byte [rdi + 0x18]
call fcn.10040f770
test eax, eax
jns 0x100408bec
mov rbx, qword [rdi + 0x10]
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
call fcn.100407e00
jmp 0x100408bec
pxor xmm1, xmm1
pxor xmm0, xmm0
cvtsi2sd xmm1, rdx
mulsd xmm1, qword [0x100436e90]
cvtsi2sd xmm0, rax
divsd xmm1, xmm0
movq r8, xmm1
jmp 0x100408b8c
mov rax, qword [0x10044c4a0]
xor r9d, r9d
lea r8, [rsp + 0x50]
mov rdx, qword [rax + 0x10]
mov ecx, dword [rax + 0x18]
call fcn.100431af0
test eax, eax
je 0x100409115
call sub.msys_2.0.dll___errno
cmp dword [rax], 2
je 0x1004091a6
call sub.msys_2.0.dll___errno
cmp dword [rax], 0x14
je 0x1004091a6
call sub.msys_2.0.dll___errno
mov rdx, qword [rbx + 8]
cmp dword [rax], 0x5c
je 0x1004091db
lea r8, [0x1004367e2]
mov rcx, rdi
call fcn.1004080d0
mov rdx, rsi
xor ecx, ecx
call fcn.100407d90
mov rbx, rax
call sub.msys_2.0.dll___errno
mov r9, rbx
lea r8, [0x1004367e4]
xor ecx, ecx
mov edx, dword [rax]
call sub.msys_2.0.dll_error
jmp case.0x100408a20.1
lea rax, [0x1004367dc]
mov qword [rsp + 0x20], rax
call fcn.10040f770
test eax, eax
jns 0x100408e3d
mov rbx, qword [rdi + 0x10]
call sub.msys_2.0.dll___errno
mov ecx, dword [rax]
mov rdx, rbx
call fcn.100407e00
jmp 0x100408e3d
mov eax, dword [rsp + 0x60]
lea r8, str.fdlsbUcp.NL_
and eax, 0xf000
cmp eax, 0x8000
je 0x100408ab0
lea r8, [0x1004367ce]
cmp eax, 0x4000
je 0x100408ab0
lea r8, [0x1004367d0]
cmp eax, 0xa000
je 0x100408ab0
lea r8, [0x1004367d2]
cmp eax, 0xc000
je 0x100408ab0
lea r8, [0x1004367d4]
cmp eax, 0x6000
je 0x100408ab0
lea r8, [0x1004367d8]
cmp eax, 0x2000
je 0x100408ab0
cmp eax, 0x1000
lea r8, [0x1004367da]
lea rax, [0x1004367d6]
cmovne r8, rax
jmp 0x100408ab0
mov rdx, qword [rbx + 8]
lea r8, [0x1004367de]
mov rcx, rdi
call fcn.1004080d0
jmp case.0x100408a20.1
call sub.msys_2.0.dll___errno
mov rdx, rsi
mov ecx, dword [rax]
call fcn.100407db0
mov dword [r12 + 0x24], 1
jmp 0x100408d63
lea r8, [0x1004367e0]
mov rcx, rdi
call fcn.1004080d0
jmp case.0x100408a20.1