Function at 0x140018860
Capabilities:
Write file on windows

Disassembly:
push rdi
sub rsp, 0x40
cmp byte [rcx + 0x42], 0
mov rdi, rcx
je 0x14001887a
mov eax, 0x80040207
add rsp, 0x40
pop rdi
ret
cmp qword [rcx + 0xb0], 0xffffffffffffffff
jne 0x14001888f
mov eax, 0x80040200
add rsp, 0x40
pop rdi
ret
mov rcx, qword [rcx + 0x28]
lea rdx, [rdi + 0x48]
mov qword [rsp + 0x60], rbx
mov qword [rsp + 0x38], rbp
mov qword [rsp + 0x30], rsi
mov rax, qword [rcx]
call qword [rax + htons]
cmp byte [rdi + 0x6d], 0
je 0x140018901
mov rbx, qword [rdi + 0x778]
test rbx, rbx
je 0x1400188d3
mov rcx, rbx
call fcn.140015b30
mov edx, 0x20
mov rcx, rbx
call fcn.1400b6094
mov ecx, 0x20
call fcn.1400b6058
test rax, rax
je 0x14001897d
mov edx, dword [rdi + 0x50]
mov rcx, rax
call fcn.140015980
mov qword [rdi + 0x778], rax
test rax, rax
je 0x1400189a5
mov eax, dword [rdi + 0x60]
xor ebx, ebx
cmp eax, 0xa
jl 0x140018a3d
cmp eax, 0xb
jle 0x1400189c5
add eax, 0xffffffec
cmp eax, 2
ja 0x140018a3d
cmp byte [rdi + 0x41], bl
je 0x140018933
cmp qword [rdi + 0x38], rbx
jne 0x140018a42
cmp qword [rdi + 0x38], rbx
jne 0x140018a49
mov ecx, 0x7f0
call fcn.1400b6058
mov rsi, rax
test rax, rax
je 0x1400189bf
movss xmm2, dword [rdi + 0x68]
cmp byte [rdi + 0x6c], bl
jne 0x140018970
cvtps2pd xmm0, xmm2
call fcn.1400f6840
mulsd xmm0, qword [0x14012f318]
xorps xmm2, xmm2
cvtsd2ss xmm2, xmm0
mov eax, dword [rdi + 0x60]
cmp eax, 0x16
jne 0x140018988
lea edx, [rax - 0x14]
jmp 0x140018990
xor ebx, ebx
mov qword [rdi + 0x778], rbx
jmp 0x1400189a5
cmp eax, 0x15
mov edx, ebx
sete dl
mov rcx, rsi
call fcn.1400157b0
mov qword [rdi + 0x38], rax
test rax, rax
jne 0x140018a49
mov eax, 0x80040202
mov rbp, qword [rsp + 0x38]
mov rbx, qword [rsp + 0x60]
mov rsi, qword [rsp + 0x30]
add rsp, 0x40
pop rdi
ret
mov qword [rdi + 0x38], rbx
jmp 0x1400189a5
mov esi, ebx
sete sil
cmp byte [rdi + 0x41], bl
je 0x1400189de
mov rax, qword [rdi + 0x30]
test rax, rax
je 0x1400189de
cmp esi, dword [rax + 0x10]
je 0x140018a42
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x1400189ee
xor edx, edx
call fcn.1400b6094
mov ecx, 0xed9b8
call fcn.1400b6058
mov rbp, rax
test rax, rax
je 0x140018a34
movss xmm2, dword [rdi + 0x68]
cmp byte [rdi + 0x6c], bl
jne 0x140018a21
cvtps2pd xmm0, xmm2
call fcn.1400f6840
mulsd xmm0, qword [0x14012f318]
xorps xmm2, xmm2
cvtsd2ss xmm2, xmm0
mov edx, esi
mov rcx, rbp
call fcn.140015940
mov qword [rdi + 0x30], rax
jmp 0x14001899c
mov qword [rdi + 0x30], rbx
jmp 0x1400189a5
cmp byte [rdi + 0x41], bl
je 0x140018a49
xor eax, eax
jmp 0x1400189aa
mov r8d, dword [rdi + 0x5c]
lea rcx, [rdi + 0xa8]
mov edx, dword [rdi + 0x50]
call fcn.1400265b0
test al, al
je 0x1400189a5
mov rcx, qword [rdi + 0x30]
movabs rax, 0x3ff0000000000000
mov byte [rdi + 0x42], 1
mov qword [rdi + 0x88], rbx
mov dword [rdi + 0x90], ebx
mov qword [rdi + 0x78], rbx
mov qword [rdi + 0x80], rbx
mov qword [rdi + 0x98], rax
mov qword [rdi + 0xa0], rbx
test rcx, rcx
je 0x140018ac0
mov r9d, dword [rdi + 0x54]
mov r8d, dword [rdi + 0x50]
mov edx, dword [rdi + 0x58]
call fcn.1400171e0
mov ecx, eax
mov ebp, eax
shr ecx, 0x1f
test cl, cl
jne 0x140018feb
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140018ae6
mov r9d, dword [rdi + 0x54]
mov r8d, dword [rdi + 0x50]
mov edx, dword [rdi + 0x58]
call fcn.140016b20
mov ebp, eax
shr eax, 0x1f
test al, al
jne 0x140018feb
mov rcx, qword [rdi + 0xb0]
xor r9d, r9d
xor r8d, r8d
mov rdx, rbx
call qword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov edx, dword [rdi + 0x50]
mov rcx, rdi
call fcn.140019070
test al, al
je 0x140018c76
mov rax, qword [rdi + 0x758]
cmp word [rax], 0x4d
jne 0x140018b87
cmp word [rax + 0xa], 0x41
jne 0x140018be1
mov ecx, 0x60
call fcn.1400b6058
test rax, rax
je 0x1400189a5
mov rcx, rax
call fcn.14003e010
mov rsi, rax
test rax, rax
je 0x1400189a5
mov edx, dword [rdi + 0x50]
mov rcx, rax
call fcn.14003e0f0
mov ecx, eax
mov ebp, eax
shr ecx, 0x1f
test cl, cl
je 0x140018b80
mov rcx, rsi
call fcn.14003e0c0
mov edx, 0x60
mov rcx, rsi
call fcn.1400b6094
mov eax, ebp
jmp 0x1400189aa
mov qword [rdi + 0x768], rsi
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x38]
mov ebp, eax
mov rax, qword [rdi + 0x758]
cmp word [rax], 0x4d
jne 0x140018cbb
cmp word [rax + 0xa], 0x41
mov rsi, qword [rdi + 0x768]
jne 0x140018c4c
mov rcx, rsi
call fcn.14003eae0
test rsi, rsi
je 0x140018cbb
mov rcx, rsi
call fcn.14003e0c0
mov edx, 0x60
mov rcx, rsi
call fcn.1400b6094
jmp 0x140018cbb
mov ecx, 0x38
call fcn.1400b6058
test rax, rax
je 0x1400189a5
mov rcx, rax
call fcn.140044b90
mov rsi, rax
test rax, rax
je 0x1400189a5
mov ecx, 0x9600
call fcn.1400b6058
test rax, rax
je 0x140018c3a
mov rdx, rsi
mov rcx, rax
call fcn.14003f2a0
test rax, rax
je 0x140018c3a
mov qword [rdi + 0x768], rax
mov qword [rdi + 0x770], rsi
jmp 0x140018b87
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [rax]
jmp 0x1400189a5
test rsi, rsi
je 0x140018c5e
mov rax, qword [rsi]
mov edx, 1
mov rcx, rsi
call qword [rax]
mov rcx, qword [rdi + 0x770]
test rcx, rcx
je 0x140018cbb
mov rax, qword [rcx]
mov edx, 1
call qword [rax]
jmp 0x140018cbb
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x18]
mov ebp, eax
shr eax, 0x1f
test al, al
jne 0x140018feb
mov byte [rdi + 0x40], bl
movzx eax, byte [rdi + 0x40]
test al, al
jne 0x140018cbb
nop dword [rax + rax]
mov rcx, qword [rdi + 0x28]
mov rax, qword [rcx]
call qword [rax + 0x20]
mov ebp, eax
shr eax, 0x1f
test al, al
jne 0x140018cbb
movzx eax, byte [rdi + 0x40]
test al, al
je 0x140018ca0
mov eax, ebp
shr eax, 0x1f
test al, al
jne 0x140018feb
mov rcx, qword [rdi + 0xb0]
lea r9, [rsp + 0x58]
mov r8d, 4
mov dword [rsp + 0x50], ebx
lea rdx, [rsp + 0x50]
mov dword [rsp + 0x58], ebx
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi + 0xb0]
lea r9, [rsp + 0x58]
mov r8d, 4
mov dword [rsp + 0x58], ebx
lea rdx, [rsp + 0x50]
mov qword [rsp + 0x20], rbx
call qword [sym.imp.KERNEL32.dll_WriteFile]
mov rcx, qword [rdi + 0x30]
test rcx, rcx
je 0x140018d26
call fcn.1400179a0
mov rcx, qword [rdi + 0x38]
test rcx, rcx
je 0x140018d34
call fcn.1400177f0
mov rcx, qword [rdi + 0x778]
test rcx, rcx
je 0x140018d72
call fcn.140017b90
mov rax, qword [rdi + 0x778]
xorps xmm0, xmm0
movss xmm2, dword [rax]
movaps xmm1, xmm2
mulss xmm1, dword [rdi + 0x90]
comiss xmm1, xmm0
jae 0x140018d6a
xorps xmm2, xmmword [0x14012dfd0]
movss dword [rdi + 0x90], xmm2
cmp byte [rdi + 0x6e], bl
je 0x140018d9e
movsd xmm1, qword [rdi + 0x80]
xorps xmm0, xmm0
cvtsi2sd xmm0, qword [rdi + 0x88]
divsd xmm1, xmm0
xorps xmm1, xmmword [0x14012f3a0]
movsd qword [rdi + 0xa0], xmm1
movsxd rax, dword [rdi + 0x60]
movss xmm3, dword [rdi + 0x68]
cvtps2pd xmm3, xmm3
cmp eax, 0x16
ja case.0x140018dcc.4
lea rdx, [0x140000000]
movzx eax, byte [rdx + rax + 0x19014]
mov ecx, dword [rdx + rax*4 + 0x18ff8]
add rcx, rdx
jmp rcx
cmp byte [rdi + 0x6c], bl
je 0x140018dee
mulsd xmm3, qword [0x14012f2b8]
movsd xmm0, qword [0x14012f310]
movaps xmm1, xmm3
call fcn.1400f6df0
movaps xmm3, xmm0
movsd qword [rdi + 0x98], xmm3
jmp case.0x140018dcc.4
cmp byte [rdi + 0x6c], bl
je 0x140018e1b
mulsd xmm3, qword [0x14012f2b8]
movsd xmm0, qword [0x14012f310]
movaps xmm1, xmm3
call fcn.1400f6df0
movaps xmm3, xmm0
movss xmm0, dword [rdi + 0x90]
xorps xmm1, xmm1
cvtps2pd xmm0, xmm0
addsd xmm0, qword [rdi + 0xa0]
comisd xmm0, xmm1
jae 0x140018e3e
xorps xmm0, xmmword [0x14012f3a0]
ucomisd xmm0, xmm1
je case.0x140018dcc.4
divsd xmm3, xmm0
xorps xmm0, xmm0
cvtsd2ss xmm0, xmm3
cvtps2pd xmm1, xmm0
movsd qword [rdi + 0x98], xmm1
jmp case.0x140018dcc.4
movsd xmm2, qword [rdi + 0x78]
xorps xmm0, xmm0
cvtsi2sd xmm0, qword [rdi + 0x88]
movsd xmm1, qword [0x14012f2d8]
sqrtpd xmm2, xmm2
divsd xmm1, xmm0
xorps xmm0, xmm0
mulsd xmm2, xmm1
sqrtpd xmm4, xmm2
comisd xmm4, xmm0
jbe 0x140018eaa
divsd xmm3, xmm4
mulsd xmm3, xmm3
movsd qword [rdi + 0x98], xmm3
jmp case.0x140018dcc.4
movsd xmm3, qword [rdi + 0x98]
mulsd xmm3, xmm3
movsd qword [rdi + 0x98], xmm3
jmp case.0x140018dcc.4
cmp byte [rdi + 0x6c], bl
je 0x140018ee3
mulsd xmm3, qword [0x14012f2b8]
movsd xmm0, qword [0x14012f310]
movaps xmm1, xmm3
call fcn.1400f6df0
movaps xmm3, xmm0
movsd xmm1, qword [rdi + 0x78]
xorps xmm0, xmm0
cvtsi2sd xmm0, qword [rdi + 0x88]
divsd xmm1, xmm0
xorps xmm0, xmm0
sqrtpd xmm2, xmm1
comisd xmm2, xmm0
jbe 0x140018f2a
movsd xmm0, qword [0x14012f2d8]
xorps xmm1, xmm1
sqrtsd xmm1, xmm3
divsd xmm0, xmm2
mulsd xmm1, xmm0
mulsd xmm1, xmm1
movsd qword [rdi + 0x98], xmm1
jmp case.0x140018dcc.4
movsd xmm1, qword [rdi + 0x98]
mulsd xmm1, xmm1
movsd qword [rdi + 0x98], xmm1
jmp case.0x140018dcc.4
cmp byte [rdi + 0x750], bl
je 0x140018f55
movss xmm0, dword [rdi + 0x754]
cvtps2pd xmm1, xmm0
jmp 0x140018f6f
mov rax, qword [rdi + 0x30]
movss xmm0, dword [rax + 0x18]
cvtps2pd xmm1, xmm0
jmp 0x140018f6f
mov rax, qword [rdi + 0x38]
movss xmm1, dword [rax + 0x14]
cvtps2pd xmm1, xmm1
mulsd xmm1, qword [0x14012f2b8]
movsd xmm0, qword [0x14012f310]
call fcn.1400f6df0
movsd qword [rdi + 0x98], xmm0
cmp byte [rdi + 0x70], bl
je 0x140018fe7
movss xmm0, dword [rdi + 0x74]
andps xmm0, xmmword [0x14012f380]
movss xmm1, dword [rdi + 0x90]
movsd xmm3, qword [0x14012f390]
cvtps2pd xmm2, xmm0
movss dword [rdi + 0x74], xmm0
cvtps2pd xmm1, xmm1
addsd xmm1, qword [rdi + 0xa0]
movaps xmm0, xmm1
mulsd xmm0, qword [rdi + 0x98]
andps xmm0, xmm3
comisd xmm0, xmm2
jbe 0x140018fe7
andps xmm1, xmm3
mov byte [rdi + 0x43], 1
divsd xmm2, xmm1
movsd qword [rdi + 0x98], xmm2
mov byte [rdi + 0x41], 1
mov byte [rdi + 0x42], bl
mov eax, ebp
jmp 0x1400189aa